LinkedIn
RSS

Archive for April, 2009


Select for all entries

GA_googleFillSlot(“POSTSAP”); When you need to access many records from one internal table is better to use select for all entries. instead of doing this loop at internal-table select * from table where……. endloop. it’s better to SELECT * FROM bkpf INTO CORRESPONDING FIELDS OF TABLE it_bkpf FOR ALL ENTRIES IN it_vbrk WHERE bukrs = it_vbrk-bukrs [...]

Read More...

Add SAP External Database Connection (DBCO)

When you want to set up external database connection, you need to use DBCO Transaction. When using DBCO you are setting up the properties for an external database. REPORT ztest. DATA: BEGIN OF wa, ncust(40) TYPE c, name(35) TYPE c, END OF wa. DATA: dbs TYPE dbcon-con_name. DATA: con(20) TYPE c. DATA : ls_wa LIKE [...]

Read More...

Button in Sales Order ( Generic Object Services )

The Upload files button in ECC is missing from sales order. In order to place this button again in sales order, please do the following: Go to SU01; Insert Username and press Edit.; Go to parameters and set: SD_SWU_ACTIVE = X ; That’s it, go to sales order and the button will be there!!

Read More...

Difference between select single and up to 1 row

The ‘SELECT SINGLE’ statement selects the first row in the database that it finds that fulfils the ‘WHERE’ clause If this results in multiple records then only the first one will be returned and therefore may not be unique. The ‘SELECT ….*….. UP TO 1 ROWS’ statement is subtly different. The database selects all of the [...]

Read More...

Calculate number of days, months and years in SAP ABAP

In ABAP there is a function to calculate the number of days, months and years! Example: CALL FUNCTION ‘FIMA_DAYS_AND_MONTHS_AND_YEARS’ EXPORTING I_DATE_FROM = ’20081008′ I_DATE_TO = ’20090116′ IMPORTING E_DAYS = T_DAYS E_MONTHS = T_MONTHS E_YEARS = T_YEARS.   Result : T_DAYS = 466 T_MONTHS = 16 T_YEARS = 2

Read More...

How to block an input field selection screen

Just use this code: PARAMETERS: p_werks LIKE mseg-werks OBLIGATORY DEFAULT ‘PHAS’ MODIF ID bl2. AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN. IF screen-name = ‘P_WERKS’ . screen-input = ‘0′. screen-output = ‘1′. MODIFY SCREEN. ENDIF. ENDLOOP.

Read More...

Upload Images to SAP SAPSCRIPT

When you net to upload images to use in sapscript or smartforms you need to use report RSTXLDMC. this report will upload images as a standard text. Then call the text name as if you were calling an SO10 standard text:

Read More...

Sales Documents Number Ranges

To see all sales documents number ranges in SAP, use transaction VN01.

Read More...