Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
36Activity
0 of .
Results for:
No results containing your search query
P. 1
Reusable abap codes

Reusable abap codes

Ratings: (0)|Views: 1,530 |Likes:
Published by api-26420083

More info:

Published by: api-26420083 on Nov 30, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Reusable abap codes :
INDEX

1. To show alternate colors in rows in alv display.
2. TO put x in fieldx for all the entered values of field
3. Choosing presentation server path on selection screen
4. choosing application (unix) server.
5. Perform used to upload the file from the presentation server.
6. Perform used to upload the file from the application server.
7. Downloading the datas to application server
8. Downloading the datas to presentation server
9. For creating dynamic table and using them
10. Good String processing code

11. Idoc programming

12. bdc programming for updating material
13. Give user the status information during execution of program
14. Program to open excel and values get feeded automatically realtime or can be feeded in background jobs
15. Pop up programming
16. Wait time program
17. at line selection event
18. simple bdc program thru excel with good error handling
19. Important tables of SAP
20. To find the creation/modification data of document at unix server
21. Code to compare contents of two internal table
22. schedule jobs programmatically
23. Coding using define & end define.

24.This include allows you to display one or more ALV tables by simply using a local class. Block mode is
supported so you can display several tables on same screen.
25.User exit for invoices - RV60AFZZ

26. Program to download file to application server and then send mail to user to download it in presentation server
27. Program which create job and specify more details
28. Program to convert spool to pdf
29. Subroutine to prevent time out error

To show alternate colors in rows in alv display.
DATA: l_color(1) TYPE c.
l_color = '0'.
LOOP AT it_result INTO wa_result.

IF l_color = '0'.
wa_result-rowcolor = 'C400'.
l_color = 'X'.

ELSE.
wa_result-rowcolor = 'C500'.
l_color = '0'.

ENDIF.
MODIFY it_result FROM wa_result.
ENDLOOP.
wa_layout-info_fieldname = 'ROWCOLOR'.
wa_layout-box_fieldname = 'C_ROW'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING
i_callback_program = sy-repid
is_layout

= wa_layout
it_fieldcat
= it_fieldcat
it_events
= it_events[]
TABLES
t_outtab
= it_final.

It_result is the final internal table which will be used in fm
REUSE_ALV_GRID_DISPLAY. It will contain one additional field \u2018 rowcolor\u2019
besides all the necessary fields.

30. To use top of page event in alv :
TO put x in fieldx for all the entered values of field.
PERFORM setdatax USING uom_s uomx.
FORM setdatax USING regdata xdata.
FIELD-SYMBOLS: <fs1>, <fs2>.
DATA: n TYPE i.

DO.
n = n + 1.
ASSIGN COMPONENT n OF STRUCTURE regdata TO <fs1>.
IF sy-subrc <> 0.
EXIT.
ENDIF.

ASSIGN COMPONENT n OF STRUCTURE xdata TO <fs2>.
IF NOT <fs1> IS INITIAL.
<fs2> = 'X'.
ENDIF.
ENDDO.
ENDFORM.
" setdatax
Good commands :
WRITE c_kunnr LEFT-JUSTIFIED TO wa_final-kunnr.
SPLIT wa_kna1-name2 AT '' INTO c_name1 c_name2 c_name3.
F4 help in selection screen for address :
(1)

AT SELECTION-SCREEN ON VALUE-REQUEST FOR po_fnm. PARAMETERS: po_fnm(80) TYPE c MODIF ID md1 DEFAULT 'C:\seedfile.txt' LOWER CASE.

(2)

AT SELECTION-SCREEN ON VALUE-REQUEST FOR outfile. PARAMETERS: outfile(60) TYPE c MODIF ID md2 DEFAULT '/usr/sap/trans/data/seedfile.txt'

LOWER CASE.
Choosing presentation server path on selection screen :
PERFORM open_folder.
FORM open_folder .

DATA: l_it_file TYPE STANDARD TABLE OF sdokpath,
l_wa_file TYPE sdokpath,
l_folder TYPE c.

Activity (36)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Velayudham Thiyagarajan added this note
super work!
akkiramreddy liked this
Di liked this
bugmenot540 liked this
vmani17 liked this
jjitendra84 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->