Call module pool program from report
Hi,
Iam calling module pool program from a report, while passing values to module pool program, one of the field doesn't have parameter id, how to pass value to it. and also please let me know how to call module pool program.
Appreciate your help.
Thanks in advance
jog
Hi Jog,
Module pool program can be run in background. Most of the BDC's are written on module pool programs and they run in the background.
Also regarrding copying the standard program, if you require to make the changes for every user then instead of copying the program make modification in standard program as copied program are much harder to maintain during support pack implementation or upgrade that modification to standard program.
Reward points if useful.
Regards,
Atish
Similar Messages
-
Call Module pool program in report
Dear guys,
i have Module pool program ZSDMODPOOL,which is transaction ZSDORD(ADDON SCREEN),Which creates sales order and shipment.
Now i want, one new screen to display before this ZSDORD Screen. In new screen i will have Table control having Internal table displaying in it.
Now, My requirement is how to pass this New screen internal table datas into Module pool program.
or i can put question as how to call module pool program
from other report program or screen.
Pls give me ideas.
ambichanYou can call the transaction using CALL TRANSACTION, or you can setup a DIALOG and call it using CALL DIALOG. Using CALL DIALOG you will be able to pass values. You create a DIALOG via transation SE35.
Regards,
Rich Heilman -
How to copy a Module Pool Program from one SAP server to another SAP server
Hi Experts,
My requirement is to copy some Module pool programs from one SAP server to another SAP server which do not have any link.
Please advise on this.
Regards
Dipakput all relevant objects inside a transport request and release it. this will generate two files, a control file in /usr/sap/trans/cofiles/ and a data file in /usr/sap/trans/data/
you can take these two files, zip'em up and e.g. email them to your destination. There they have to be put into the same directories of that other server and can then be added to the import queue and finally imported.
These last steps would usually be done by an administrator.
Both systems should be on the same release, as far as I know.
Cheers
Thomas -
Can we call a bdc program from report program
hi
can we call a bdc program from report programYes you can any program from another program using
SUBMIT <repname> statement
SUBMIT <repname> USING SELECTION-SCREEN dynnr.
or
SUBMIT <repname> VIA SELECTION-SCREEN USING SELECTION-SET variant
SUBMIT <repname> VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar
etc.
Regards
Prax -
Call module pool screen from ABAP Webdynpro
Hi All
I designed one screen in normal classical dynpro in SE80 for module pool program. I want to call that screen layout design in webdynpro view layout.
So please help me how can i call that module pool screen from my ABAP webdynproHi
Thank you for your great replay. But Mr Ramakrishnappa and Mr Katrice as your reference i go through that but when i insert the program name and screen number program is end with a run time error saying
dynamic type conflict when assigning reference.
Please refer the below snap shot -
Differences between Module Pool Programming and Reports and Scripts
Hi,
please tell me the Differences between Module Pool Programming , Reports and Scripts .
Thanks nad Regards ,
PavanKumarHi
Type 1 - is a report programming it can be executed by both transaction and program (F8). Hence its is also called as Executable program.You can start logical databases together with reports.
Type M - Its a module pool program which is executed only by transaction code.
Scripts - report with GUI interface. we can have graphics, watermark .
SAPscript is a client dependent one.the Transaction for script is SE71. -
How to down load the Module pool program from sap
hi friends,
i am having the Module pool program in one server
it consists of 1 screen.
now i want to down load the Module pool program into another server.
those two server are not linked.
is there any way to copy from one server to another server.
like what we do in smartfroms,that is downloading form and uploading the form.Hi,
You can down load code from source system and u can upload those in your destination system. You can down load Code as normally like execute SE38 > enter ur program name> click on change button> Utilities(in menu bar)->more utilities>upload/down load>down load in source system & Just use same path with upload instead of down load. So this will help u to transfer code from one system to other.
Screens transfer: SE51> enter ur program name & screen no> click on change button> click on Layout button> Utilities(m)>upload/download>download for down loading a screen from source system.
And follow the same procedure in destination system also just use up load instead of download. to upload a screen in destination system.
Hope useful.
Regards,
BBR. -
How to pass values to a module pool program from another Report Program
Hi ..
Please let me know how I can pass values to a MODULE POOL selection screen field from another Report Program.
Thanks
RKhttp://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/frameset.htm
a® -
Transporting module pool program from sand dev to dev system
Hi,
Can any body tell me how to transport module pool objects(including screens) from sand dev to dev system rather than manually with in the same client.
regards,
prasad reddy.Hi
Go to Screen painter and give your program name which you wanted to transport.
Go to --> Object directory entry and there enter Development class and press enter then it will ask for request,. create a request accordingly.
Then you can release the sub task and give the main request to your Basis person to move it to target system.
Regads
Suresh -
HOw to find Report program associated module pool program?
HOw to find Report program associated module pool program?
I.e
Me21n is the tcode.I want to find screens related to this tcode.
Associated report program is RM_MEPO_GUI.(It has no screens hence it is a report program).
(if module program is attached to tcode,i can easily find entries in d020s)
Here report program is calling a module pool program SAPLMEGUI(Has screens).
If i give the Tcode Me21n,i want to list out all the screens of it..
Can u give any suggestion....Hi Sampath.
Manually i can see it (by seeing in system-status)..
programmatically i want to know..
for ex:if u take Tcode:Va01
we can get program (dialog) and tcode in Tstc table .
If we know the program name(dialog), we can find program and screens in d020s table.
Va01 is atatched to a module pool program..No problem to find screens..
In case of me21n,
It is atatched to report program(calling module pool program)..
Here i could not be able to get the screens ..
I think u undrstood my problem.. -
Can we call a bdc program from a report?how
hi
experts can u help me for thisHi
Yes, You can call a BDC program from Report.
see the sample report in which it is used
REPORT zm_reservation_alert
NO STANDARD PAGE HEADING
MESSAGE-ID zm_msg.
D A T A B A S E T A B L E S D E C L A R A T I O N
T Y P E S D E C L A R A T I O N S
Reservations Main Structure
TYPES: BEGIN OF s_res,
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
usnam TYPE usnam, " User Name
bwart TYPE bwart, " Movement Type
aufnr TYPE aufnr, " Order Number
rsart TYPE rsart, " Record Type
bdart TYPE bdart, " Reservation Type
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
usrid TYPE sysid, " User ID
END OF s_res.
Output Main Structure
TYPES: BEGIN OF s_rep,
usnam TYPE usnam, " User Name
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
aufnr TYPE aufnr, " Order Number
END OF s_rep.
User Dept Details
TYPES: BEGIN OF s_dept,
pernr TYPE persno, " Personal No
usrid TYPE sysid, " User ID
orgeh TYPE orgeh, " Orgn Unit
orgtx TYPE orgtx, " Dept Name
END OF s_dept.
For Send Mail Purpose
DATA : i_doc_data LIKE sodocchgi1.
DATA : BEGIN OF i_pack_list OCCURS 0.
INCLUDE STRUCTURE sopcklsti1.
DATA : END OF i_pack_list.
DATA : BEGIN OF i_receivers OCCURS 0.
INCLUDE STRUCTURE somlreci1.
DATA : END OF i_receivers.
DATA : BEGIN OF i_contents OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_contents.
DATA : BEGIN OF i_header OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_header.
DATA : BEGIN OF i_att OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_att.
Internal table for bdcdata
DATA : it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Internal table to handle messages
DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
D A T A D E C L A R A T I O N S
DATA: gv_lines TYPE sy-index, " Total Lines int Table
gv_days TYPE i, " Difference Days
gv_date TYPE sy-datum, " Date
gv_date1 TYPE sy-datum, " Date
gv_date2 TYPE sy-datum, " Date
gv_text(85), " Text Field
gv_mesg(70), " Error Messages
gv_bdc, " BDC Flag
gv_flag TYPE i, " Flag
gv_ernam TYPE ernam. " User ID
C O N S T A N T S D E C L A R A T I O N S
CONSTANTS: c_x VALUE 'X', " Flag
c_endda TYPE endda VALUE '99991231'. " Date
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE, " Reservns
i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE. " Output
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
Process data
PERFORM process_data.
*& Form fetch_data
Fetching the Reservations related data from Database Tables
FORM fetch_data .
CLEAR: gv_date, gv_date1, gv_date2.
gv_date = sy-datum.
gv_date1 = sy-datum - 10.
gv_date2 = sy-datum + 10.
CLEAR i_res.
REFRESH i_res.
SELECT a~rsnum " Reservation No.
b~rspos " Reservation Item
a~usnam " User Name
a~bwart " Movement Type
a~aufnr " Order Number
b~rsart " Record Type
b~bdart " Reservation Type
b~matnr " Material No
b~bdter " Req Date
INTO TABLE i_res
FROM rkpf AS a JOIN resb AS b
ON arsnum = brsnum
WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
b~xloek EQ ' '.
SORT i_res BY rsnum rspos.
DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
Add userid into the i_usr int table
LOOP AT i_res.
i_res-usrid = i_res-usnam.
MODIFY i_res INDEX sy-tabix.
ENDLOOP.
IF NOT i_res[] IS INITIAL.
Get the User Dept Name
CLEAR i_dept.
REFRESH i_dept.
SELECT a~pernr " Personal No
a~usrid " User ID
b~orgeh " Orgn Unit
c~orgtx " Dept Name
INTO TABLE i_dept
FROM pa0105 AS a JOIN pa0001 AS b
ON apernr = bpernr JOIN t527x AS c
ON borgeh = corgeh
FOR ALL ENTRIES IN i_res
WHERE a~usrid = i_res-usrid AND
a~endda EQ c_endda AND
b~endda EQ c_endda.
ENDIF.
SORT i_dept BY pernr.
DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
Move the Creator of Reservation to a diff table
LOOP AT i_res.
MOVE-CORRESPONDING i_res TO i_rep.
APPEND i_rep.
CLEAR i_rep.
ENDLOOP.
SORT i_rep BY usnam rsnum rspos.
ENDFORM. " Fetch_Data
*& Form process_data
Process the Reservations related data for Expiry Date
FORM process_data .
DATA: lv_date1 LIKE sy-datum,
lv_date2 LIKE sy-datum,
lv_date3(10),
lv_menge(13),
lv_tabix LIKE sy-tabix.
LOOP AT i_rep.
CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
lv_tabix = sy-tabix.
AT NEW usnam.
Populate the Contents Table
CLEAR i_att.
REFRESH i_att.
i_att = 'Reservations Reminder'(014).
APPEND i_att.
i_att = '----
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
INTO i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
i_att = 'Please find the List of expiring Reservations'(004).
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
'Due Date'(008) 'Work Center/CC'(005) INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
ENDAT.
gv_days = i_rep-bdter - gv_date.
lv_date1 = i_rep-bdter + 5.
lv_date2 = i_rep-bdter + 10.
MOVE i_rep-menge TO lv_menge.
WRITE i_rep-bdter TO lv_date3.
IF gv_days = 10.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_days = 5.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date1.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date2.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
Mark the Reservation Item 'DELETED' using BDC.
UPDATE resb SET xloek = c_x.
PERFORM delete_item_resb.
ENDIF.
AT END OF usnam.
IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
gv_date = lv_date2 ).
Read the User who creates the Reservn and send a mail alert to him
CLEAR : i_receivers,gv_ernam.
REFRESH: i_receivers.
READ TABLE i_rep INDEX lv_tabix.
gv_ernam = i_rep-usnam.
IF gv_ernam <> space.
Send mail Alert to PR Creator(SAP inbox)
PERFORM send_alert_data.
Send Mail to External Mail ID of the SAP USER
PERFORM send_mail_external.
ENDIF.
ENDIF.
ENDAT.
ENDLOOP.
ENDFORM. " Process_data
*& Form delete_item_resb
Set the Deletion Indicator for the Res. Item in RESB
FORM delete_item_resb.
gv_bdc = 'N'.
Perform to fill it_bdcdata.
PERFORM fill_it_bdcdata.
Call the Transaction MB22
CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
MESSAGES INTO it_messages.
IF sy-subrc <> 0.
gv_flag = 1.
If error occurs in transaction mode run bdc session for that data
PERFORM bdc_process.
ENDIF.
Handles error messages
PERFORM error_messages.
CLEAR : it_bdcdata, it_messages.
REFRESH : it_bdcdata, it_messages.
IF gv_bdc = 'O'.
close bdc if it is open
PERFORM close_bdc.
ENDIF.
ENDFORM. "delete_item_resb
*& Form FILL_IT_BDCDATA
Filling Bdcdata structure with data
FORM fill_it_bdcdata.
PERFORM bdc_dynpro USING 'SAPMM07R' '0560'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM07M-RSPOS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RM07M-RSNUM'
i_rep-rsnum.
PERFORM bdc_field USING 'RM07M-RSPOS'
i_rep-rspos.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-XLOEK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RESB-XLOEK'
c_x.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-ERFMG'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDFORM. " FILL_IT_BDCDATA
*& Form BDC_DYNPRO
Filling the it_bdcdata table with program name & screen number
FORM bdc_dynpro USING program LIKE bdcdata-program
dynpro LIKE bdcdata-dynpro.
it_bdcdata-program = program.
it_bdcdata-dynpro = dynpro.
it_bdcdata-dynbegin = 'X'.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
Filling it_bdcdata with field name and field value
FORM bdc_field USING fnam LIKE bdcdata-fnam
fval.
it_bdcdata-fnam = fnam.
it_bdcdata-fval = fval.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_FIELD
*& Form ERROR_MESSAGES
Displaying error messages
FORM error_messages.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = sy-langu
IMPORTING
msg = gv_mesg
EXCEPTIONS
not_found = 1
OTHERS = 2.
LOOP AT it_messages WHERE msgtyp = 'E'.
WRITE : / 'Message :'(001) ,gv_mesg.
CLEAR it_messages.
ENDLOOP.
ENDFORM. " ERROR_MESSAGES
*& Form BDC_PROCESS
Open bdc session if call transaction fails
FORM bdc_process.
IF gv_bdc = 'N'.
open bdc session
PERFORM open_bdc.
gv_bdc = 'O'.
ENDIF.
IF gv_bdc = 'O'.
insert data into bdc session
PERFORM insert_bdc.
ENDIF.
ENDFORM. " BDC_PROCESS
*& Form OPEN_BDC
Calling function module to open bdc session
FORM open_bdc.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'ZMM'
keep = 'X'
user = sy-uname
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
ENDFORM. " OPEN_BDC
*& Form INSERT_BDC
Insert it_bdcdata into bdc by calling function module bdc_insert
FORM insert_bdc.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'MB22'
TABLES
dynprotab = it_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
ENDFORM. " INSERT_BDC
*& Form CLOSE_BDC
Closing bdc session
FORM close_bdc.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
ENDFORM. " CLOSE_BDC
*& Form send_alert_data
Send Alert for the Expired Contract
FORM send_alert_data .
CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
REFRESH : i_receivers,i_header,i_contents.
DESCRIBE TABLE i_att LINES gv_lines.
i_receivers-receiver = gv_ernam.
i_receivers-receiver = 'SSHEIK'.
i_receivers-rec_type = 'B'.
i_receivers-rec_date = sy-datum.
i_receivers-express = 'X'.
i_receivers-com_type = 'INT'.
i_receivers-notif_del = 'X'.
APPEND i_receivers.
i_doc_data-obj_name = 'SAPoffice'(013).
i_doc_data-obj_descr = 'Reservations Reminder'(014).
i_doc_data-obj_langu = 'E'.
i_doc_data-no_change = c_x.
i_doc_data-obj_prio = 1.
i_doc_data-priority = 1.
i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
i_pack_list-transf_bin = c_x.
i_pack_list-head_start = '1'.
i_pack_list-head_num = '1'.
i_pack_list-body_start = '1'.
i_pack_list-body_num = gv_lines.
i_pack_list-doc_type = 'DOC'.
i_pack_list-obj_name = 'SAPoffice'(013).
i_pack_list-obj_descr = 'Reservations Reminder'(014).
i_pack_list-obj_langu = 'E'.
i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
APPEND i_pack_list.
i_header-line = 'Header'. APPEND i_header.
Data for contents
i_contents-line = 'Please find the Reservations Due List'(016).
APPEND i_contents.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_doc_data
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = i_pack_list
object_header = i_header
contents_bin = i_att
contents_txt = i_contents
receivers = i_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc = 0.
MESSAGE i000 WITH 'Mail Sucessfully sent'(017).
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " send_alert_data
*& Form send_mail_external
Send mail to External MAIL ID of the PR Creator
FORM send_mail_external.
DATA : lv_str(24), lv_str1(40),
lv_pernr LIKE adr6-persnumber,
lv_adrnr LIKE adr6-addrnumber,
lv_usrid LIKE pa0105-usrid,
lv_mail LIKE adr6-smtp_addr,
lv_sendor TYPE syuname,
lv_receiver TYPE string,
lv_header TYPE string,
lv_body TYPE string.
CLEAR: lv_pernr, lv_usrid, lv_adrnr,
lv_mail, lv_sendor, lv_receiver,
lv_header, lv_body .
lv_usrid = gv_ernam.
SELECT SINGLE persnumber addrnumber FROM usr21
INTO (lv_pernr,lv_adrnr)
WHERE bname = lv_usrid.
IF sy-subrc = 0.
SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
WHERE addrnumber = lv_adrnr AND
persnumber = lv_pernr.
IF sy-subrc <> 0.
CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
lv_receiver = lv_mail.
ELSE.
lv_receiver = lv_mail.
ENDIF.
lv_receiver = '[email protected]'.
lv_sendor = 'JALKHATAM'.
lv_header = 'Reservations Reminder'(014).
lv_str = 'Pls check your SAP Inbox'(019).
lv_str1 = 'for the status of Reservations Due List'(020).
CONCATENATE lv_str lv_str1 INTO lv_body
SEPARATED BY space.
Call Function Module To send mail
CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
EXPORTING
id_header = lv_header
id_body = lv_body
id_receiver = lv_receiver
id_sender = lv_sendor
ID_HTML_MAIL =
id_commit_work = 'X'
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " send_mail_external
<b>Reward points for useful Answers</b>
Regards
Ashu -
How to DOWNLOAD a whole module pool program????
Hi..
can anybody tell me how to download a <b>whole module pool program</b> into my desktop with .sap extension???
Actually i want to download a whole module pool program from a server so that i can upload the same program into another sap server instead of writing the whole code.
Thanx in advance......the program is exits..
i don't y it is not for ur.....
i am sending d code for the same....
create a program and check...
*& Report REPTRAN *
*& This report allows to display and save complete programs and *
*& function modules. *
*& This report was originally written by Frank Wolf, Xaption GmbH. *
*& Its original name was ZREPTRAN (see www.abaps.de). *
REPORT reptran LINE-SIZE 170 .
TABLES: d010inc, trdir, eudb, title, d020t, trkey, tfdir, tmdir, tadir,
seoclass, seoclassdf, seoclassex, seoclasstx, seometarel,
seocompo, seocompodf, seocompoex, seocompotx, seoimplrel,
seomapatt, seomapcls, seoredef, seofriends, seotypepls,
seosubco, seosubcodf, seosubcoex, seosubcotx.
TYPES: abapline(255).
TYPES: BEGIN OF ty_tit,
code TYPE rsoldleng-title,
text TYPE title-text_line,
END OF ty_tit.
TYPES: BEGIN OF ty_reptxt,
id TYPE textpool-id,
key TYPE textpool-key,
entry TYPE textpool-entry,
length(4) TYPE n,
END OF ty_reptxt.
TYPES: BEGIN OF ty_d020t,
prog TYPE d020t-prog,
dynr TYPE d020t-dynr,
dtxt TYPE d020t-dtxt,
END OF ty_d020t.
TYPES: BEGIN OF dynp_rel_type, "Dynpro-Releases
rel(1),
dot(1),
version(2),
END OF dynp_rel_type.
TYPES: BEGIN OF ty_seocompodf_t.
INCLUDE STRUCTURE seocmpkey.
TYPES: version TYPE seocompodf-version,
alias TYPE seocompodf-alias,
redefin TYPE seocompodf-redefin,
exposure TYPE seocompodf-exposure,
state TYPE seocompodf-state,
editorder(4) TYPE n,
locked TYPE seocompodf-locked,
dispid(4) TYPE n.
INCLUDE STRUCTURE seochange.
INCLUDE STRUCTURE seomtdapx.
INCLUDE STRUCTURE seoevtapx.
INCLUDE STRUCTURE seotypapx.
TYPES: typtype TYPE seocompodf-typtype,
type TYPE seocompodf-type,
tableof TYPE seocompodf-tableof,
srcrow1(4) TYPE n,
srccolumn1(2) TYPE n,
srcrow2(4) TYPE n,
srccolumn2(2) TYPE n.
INCLUDE STRUCTURE seocmpref.
TYPES: END OF ty_seocompodf_t.
TYPES: BEGIN OF ty_seosubcodf_t.
INCLUDE STRUCTURE seoscokey.
TYPES: version TYPE seosubcodf-version,
editorder(4) TYPE n,
dispid(4) TYPE n.
INCLUDE STRUCTURE seochange.
TYPES: pardecltyp TYPE seosubcodf-pardecltyp,
parpasstyp TYPE seosubcodf-parpasstyp,
typtype TYPE seosubcodf-typtype,
type TYPE seosubcodf-type,
tableof TYPE seosubcodf-tableof,
srcrow1(4) TYPE n,
srccolumn1(2) TYPE n,
srcrow2(4) TYPE n,
srccolumn2(2) TYPE n,
parvalue TYPE seosubcodf-parvalue,
paroptionl TYPE seosubcodf-paroptionl.
INCLUDE STRUCTURE seoexcapx.
TYPES: END OF ty_seosubcodf_t.
Release bis 3.1
*INCLUDE mseuxcom.
DATA: eu_key TYPE rseu1_key.
Titel
DATA: tit TYPE STANDARD TABLE OF ty_tit WITH HEADER LINE.
Release from 4.6
DATA: fun4 TYPE STANDARD TABLE OF rsmpe_funt WITH HEADER LINE.
DATA: ctx4 TYPE STANDARD TABLE OF rsmpe_ctx WITH HEADER LINE.
DATA: mtx4 TYPE STANDARD TABLE OF rsmpe_mnlt WITH HEADER LINE.
DATA: men4 TYPE STANDARD TABLE OF rsmpe_men WITH HEADER LINE.
DATA: act4 TYPE STANDARD TABLE OF rsmpe_act WITH HEADER LINE.
DATA: doc4 TYPE STANDARD TABLE OF rsmpe_atrt WITH HEADER LINE.
DATA: sta4 TYPE STANDARD TABLE OF rsmpe_stat WITH HEADER LINE.
DATA: set4 TYPE STANDARD TABLE OF rsmpe_staf WITH HEADER LINE.
DATA: pfk4 TYPE STANDARD TABLE OF rsmpe_pfk WITH HEADER LINE.
DATA: but4 TYPE STANDARD TABLE OF rsmpe_but WITH HEADER LINE.
DATA: tit4 TYPE STANDARD TABLE OF rsmpe_titt WITH HEADER LINE.
DATA: stx4 TYPE STANDARD TABLE OF rsmptexts WITH HEADER LINE.
DATA: adm4 TYPE rsmpe_adm.
Release from 4.6c
DATA: biv46c TYPE STANDARD TABLE OF rsmpe_buts WITH HEADER LINE.
DATA: reports TYPE STANDARD TABLE OF trdir-name WITH HEADER LINE,
reportname TYPE string.
DATA: i_repsrc TYPE STANDARD TABLE OF abapline WITH HEADER LINE.
DATA: i_reptx TYPE STANDARD TABLE OF textpool WITH HEADER LINE.
DATA: i_reptxt TYPE STANDARD TABLE OF ty_reptxt WITH HEADER LINE.
DATA: i_adm4 TYPE STANDARD TABLE OF rsmpe_adm WITH HEADER LINE.
DATA: i_tmd TYPE STANDARD TABLE OF tmdir.
DATA: i_tfd TYPE STANDARD TABLE OF tfdir.
DATA: i_cls TYPE STANDARD TABLE OF seoclass.
DATA: i_cdf TYPE STANDARD TABLE OF seoclassdf.
DATA: i_clx TYPE STANDARD TABLE OF seoclassex.
DATA: i_clt TYPE STANDARD TABLE OF seoclasstx.
DATA: i_cmr TYPE STANDARD TABLE OF seometarel.
DATA: i_cmp TYPE STANDARD TABLE OF seocompo.
DATA: i_cmd TYPE STANDARD TABLE OF seocompodf WITH HEADER LINE.
DATA: i_cmd_t TYPE STANDARD TABLE OF ty_seocompodf_t WITH HEADER LINE.
DATA: i_cmx TYPE STANDARD TABLE OF seocompoex.
DATA: i_cmt TYPE STANDARD TABLE OF seocompotx.
DATA: i_irl TYPE STANDARD TABLE OF seoimplrel.
DATA: i_mat TYPE STANDARD TABLE OF seomapatt.
DATA: i_mac TYPE STANDARD TABLE OF seomapcls.
DATA: i_red TYPE STANDARD TABLE OF seoredef.
DATA: i_frd TYPE STANDARD TABLE OF seofriends.
DATA: i_tpl TYPE STANDARD TABLE OF seotypepls.
DATA: i_sco TYPE STANDARD TABLE OF seosubco.
DATA: i_scd TYPE STANDARD TABLE OF seosubcodf WITH HEADER LINE.
DATA: i_scd_t TYPE STANDARD TABLE OF ty_seosubcodf_t WITH HEADER LINE.
DATA: i_scx TYPE STANDARD TABLE OF seosubcoex.
DATA: i_sct TYPE STANDARD TABLE OF seosubcotx.
DATA: i_inc TYPE STANDARD TABLE OF d010inc-include WITH HEADER LINE.
DATA: i_d020t TYPE STANDARD TABLE OF ty_d020t WITH HEADER LINE.
DATA: hdr TYPE d020s,
fld TYPE STANDARD TABLE OF d021s WITH HEADER LINE,
src TYPE STANDARD TABLE OF d022s WITH HEADER LINE,
mat TYPE STANDARD TABLE OF d023s WITH HEADER LINE.
CONSTANTS:
stars(64) VALUE
"#EC NOTEXT
comment1(64) VALUE
'* THIS FILE IS GENERATED BY THE SCREEN PAINTER. *',
"#EC NOTEXT
comment2(64) VALUE
'* NEVER CHANGE IT MANUALLY, PLEASE ! *',
"#EC NOTEXT
dynpro_text(8) VALUE '%_DYNPRO', "#EC NOTEXT
header_text(8) VALUE '%_HEADER', "#EC NOTEXT
params_text(8) VALUE '%_PARAMS', "#EC NOTEXT
descript_text(13) VALUE '%_DESCRIPTION', "#EC NOTEXT
fields_text(8) VALUE '%_FIELDS', "#EC NOTEXT
kreuz(1) VALUE 'x', "#EC NOTEXT
flowlogic_text(11) VALUE '%_FLOWLOGIC'. "#EC NOTEXT
DATA: header_char TYPE scr_chhead.
DATA: fields_char TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
DATA: dynp_char TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
DATA: prog_len TYPE p.
DATA: BEGIN OF dynp,
prog TYPE d020s-prog,
dnum TYPE d020s-dnum,
END OF dynp.
DATA:
scrp_rel TYPE dynp_rel_type VALUE '4.02'. "Rel. Scrp. 4.02
scrp_rel TYPE dynp_rel_type VALUE '4.60'. "Rel. Scrp. 4.6A
DATA dynp_rel TYPE dynp_rel_type. "akt. Rel. Dynpro
DATA: dynpro_rel(4).
DATA status.
DATA prog_len_akt TYPE p.
DATA release.
DATA rows LIKE sy-curow.
DATA lines LIKE sy-cucol.
DATA: filename TYPE string.
DATA: subrc LIKE sy-subrc.
DATA: os(10).
DATA: delux VALUE '/'.
DATA: delwn VALUE '\'.
DATA: delim.
DATA: dirux(250) VALUE '-l>dir.tmp'.
DATA: dirwn(250) VALUE '/Q /Cdir>dir.tmp'.
DATA: command(250).
DATA: shellux(250) VALUE 'bash'.
DATA: shellwn(250) VALUE 'cmd.exe'.
DATA: shell(250).
DATA: file TYPE rlgrap-filename.
DATA: answer.
DATA: incname TYPE d010inc-include.
DATA: repname TYPE d010inc-include.
DATA: rest1 TYPE d010inc-include.
DATA: rest2 TYPE d010inc-include.
DATA: kz_renam.
DATA: classname TYPE seoclsname.
DATA: classtype(2).
DATA: offset TYPE i.
DATA: savepath(250).
SELECT-OPTIONS: report FOR trdir-name.
SELECTION-SCREEN: SKIP.
SELECT-OPTIONS: cnam FOR trdir-cnam MATCHCODE OBJECT user_addr,
unam FOR trdir-unam MATCHCODE OBJECT user_addr,
devclass FOR tadir-devclass,
subc FOR trdir-subc,
rstat FOR trdir-rstat,
cdat FOR trdir-cdat,
udat FOR trdir-udat.
SELECTION-SCREEN: SKIP.
PARAMETERS: path(250).
SELECTION-SCREEN: SKIP.
PARAMETERS: display RADIOBUTTON GROUP func,
save RADIOBUTTON GROUP func,
savedspl RADIOBUTTON GROUP func.
SELECTION-SCREEN: SKIP.
PARAMETERS: codeonly AS CHECKBOX.
SELECTION-SCREEN: SKIP.
*PARAMETERS: suffix(80) LOWER CASE.
DATA: suffix(80) TYPE c.
LOAD-OF-PROGRAM.
AUTHORITY-CHECK OBJECT 'S_DEVELOP'
ID 'DEVCLASS' DUMMY
ID 'OBJTYPE' FIELD 'PROG'
ID 'OBJNAME' FIELD 'REPTRAN'
ID 'PGROUP' DUMMY
ID 'ACTVT' FIELD '03'.
IF sy-subrc <> 0.
MESSAGE e059(EU) WITH 'REPTRAN'.
ENDIF.
INITIALIZATION.
GET PARAMETER ID 'REPTRAN_PATH' FIELD path.
IF path IS INITIAL.
path = 'C:\ABAPS\'.
ENDIF.
save = 'X'.
codeonly = 'X'.
CALL FUNCTION 'WS_QUERY'
EXPORTING
ENVIRONMENT = ' '
FILENAME = ' '
query = 'OS'
WINID = ' '
IMPORTING
return = os
EXCEPTIONS
inv_query = 1
no_batch = 2
frontend_error = 3
OTHERS = 4.
IF sy-subrc = 0 AND
( os CS 'OS2' OR os CS 'DOS' OR os CS 'NT' ).
delim = delwn.
command = dirwn.
shell = shellwn.
ELSE.
delim = delux.
command = dirux.
shell = shellux.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR path.
GET CURSOR FIELD path VALUE path.
filename = path.
PERFORM fileselector.
AT SELECTION-SCREEN.
IF report[] IS INITIAL.
IF NOT reports[] IS INITIAL.
report = 'IEQ'.
report-low = reports.
APPEND report.
MESSAGE i208(00)
WITH 'Report/BSP application was also identified'(009).
ELSE.
MESSAGE e208(00)
WITH 'Enter report or BSP application or enter path'(011).
ENDIF.
ENDIF.
START-OF-SELECTION.
offset = strlen( path ) - 1.
IF path+offset(1) <> '\'.
CONCATENATE path '\' INTO path.
ENDIF.
SET PARAMETER ID 'REPTRAN_PATH' FIELD path.
FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
eu_key-sprsl = sy-langu.
IF NOT save IS INITIAL OR
NOT display IS INITIAL OR
NOT savedspl IS INITIAL.
DOWNLOAD PROGRAMS
SELECT name FROM trdir
INTO TABLE reports
WHERE name IN report
AND cnam IN cnam
AND unam IN unam
AND subc IN subc
AND rstat IN rstat
AND cdat IN cdat
AND udat IN udat.
IF sy-subrc <> 0.
LOOP AT report.
CONCATENATE report(3) 'SAPL' report+3 INTO report.
MODIFY report.
ENDLOOP.
SELECT name FROM trdir
INTO TABLE reports
WHERE name IN report
AND cnam IN cnam
AND unam IN unam
AND subc IN subc
AND rstat IN rstat
AND cdat IN cdat
AND udat IN udat.
ENDIF.
IF sy-subrc <> 0.
MESSAGE i208(00)
WITH 'The program/function name entered does not exist!'(082).
ENDIF.
LOOP AT reports.
Check if report is in development class
classtype = reports+30.
IF reports(5) NE 'CL_O2'.
IF classtype = 'CP'.
tadir-obj_name = reports.
SHIFT tadir-obj_name RIGHT DELETING TRAILING space.
SHIFT tadir-obj_name RIGHT BY 2 PLACES.
SHIFT tadir-obj_name RIGHT DELETING TRAILING '='.
SHIFT tadir-obj_name LEFT DELETING LEADING space.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'CLAS'
AND obj_name = tadir-obj_name
AND devclass IN devclass.
ENDIF.
IF classtype <> 'CP' OR sy-subrc <> 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = reports
AND devclass IN devclass.
IF sy-subrc <> 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = reports
AND devclass IN devclass.
ENDIF.
IF sy-subrc <> 0 AND
( reports(4) = 'SAPL' OR reports(4) = 'sapl' ).
reportname = reports+4.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = reportname
AND devclass IN devclass.
ENDIF.
ENDIF.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
ENDIF.
reportname = reports.
PERFORM makepath USING reportname
path
CHANGING savepath.
PERFORM writeinfo USING reportname
savepath.
REFRESH: i_repsrc, i_reptx, i_reptxt, i_inc,
sta4, ctx4, fun4, mtx4, doc4, tit4, men4, act4, but4,
pfk4, set4, stx4, biv46c,
i_d020t, i_adm4,
i_tmd, i_tfd, i_cls, i_cdf, i_clx, i_clt, i_cmr, i_cmp,
i_cmd, i_cmx, i_cmt, i_irl, i_mat, i_mac, i_red, i_frd,
i_tpl, i_sco, i_scd, i_scx, i_sct, i_cmd_t, i_scd_t.
CLEAR: adm4.
eu_key-name = reports.
READ REPORT reports INTO i_repsrc.
IF codeonly <> 'X'.
READ TEXTPOOL reports INTO i_reptx.
ENDIF.
LOOP AT i_reptx.
MOVE-CORRESPONDING i_reptx TO i_reptxt.
APPEND i_reptxt.
ENDLOOP.
IF NOT display IS INITIAL OR
NOT savedspl IS INITIAL.
PERFORM show_rep.
ENDIF.
IF classtype = 'CP' OR classtype = 'IP'.
classname = reports(30).
TRANSLATE classname USING '= '.
SELECT * FROM tmdir INTO TABLE i_tmd
WHERE classname = classname.
SELECT * FROM seoclass INTO TABLE i_cls
WHERE clsname = classname.
SELECT * FROM seoclassdf INTO TABLE i_cdf
WHERE clsname = classname.
SELECT * FROM seoclassex INTO TABLE i_clx
WHERE clsname = classname.
SELECT * FROM seoclasstx INTO TABLE i_clt
WHERE clsname = classname.
SELECT * FROM seometarel INTO TABLE i_cmr
WHERE clsname = classname.
SELECT * FROM seocompo INTO TABLE i_cmp
WHERE clsname = classname.
SELECT * FROM seocompodf INTO TABLE i_cmd
WHERE clsname = classname.
LOOP AT i_cmd.
MOVE-CORRESPONDING i_cmd TO i_cmd_t.
APPEND i_cmd_t.
ENDLOOP.
SELECT * FROM seocompoex INTO TABLE i_cmx
WHERE clsname = classname.
SELECT * FROM seocompotx INTO TABLE i_cmt
WHERE clsname = classname.
SELECT * FROM seoimplrel INTO TABLE i_irl
WHERE clsname = classname.
SELECT * FROM seomapatt INTO TABLE i_mat
WHERE clsname = classname.
SELECT * FROM seomapcls INTO TABLE i_mac
WHERE clsname = classname.
SELECT * FROM seoredef INTO TABLE i_red
WHERE clsname = classname.
SELECT * FROM seofriends INTO TABLE i_frd
WHERE clsname = classname.
SELECT * FROM seotypepls INTO TABLE i_tpl
WHERE clsname = classname.
SELECT * FROM seosubco INTO TABLE i_sco
WHERE clsname = classname.
SELECT * FROM seosubcodf INTO TABLE i_scd
WHERE clsname = classname.
LOOP AT i_scd.
MOVE-CORRESPONDING i_scd TO i_scd_t.
APPEND i_scd_t.
ENDLOOP.
SELECT * FROM seosubcoex INTO TABLE i_scx
WHERE clsname = classname.
SELECT * FROM seosubcotx INTO TABLE i_sct
WHERE clsname = classname.
ELSE.
CLEAR classtype.
ENDIF.
IF codeonly <> 'X'.
SELECT * FROM tfdir INTO TABLE i_tfd
WHERE pname = reports.
CALL FUNCTION 'RS_CUA_INTERNAL_FETCH'
EXPORTING
program = reports
LANGUAGE =
STATE = 'A'
IMPORTING
adm = adm4
LANGU =
AUTHOR =
DATE =
TIME =
CAUTHOR =
CDATE =
CTIME =
GDATE =
GTIME =
TABLES
sta = sta4
fun = fun4
men = men4
mtx = mtx4
act = act4
but = but4
pfk = pfk4
set = set4
doc = doc4
tit = tit4
biv = biv46c
EXCEPTIONS
not_found = 1
unknown_version = 2
OTHERS = 3.
SELECT ddnr text_line FROM title INTO TABLE tit
WHERE ddlanguage = eu_key-sprsl AND
progname = eu_key-name.
SELECT * FROM rsmptexts INTO TABLE stx4
WHERE progname = eu_key-name AND
sprsl = eu_key-sprsl.
SELECT prog dynr dtxt FROM d020t INTO TABLE i_d020t
WHERE prog = reports AND
NOT dtxt LIKE 'SEL_SCREEN%'.
ENDIF.
IF NOT classtype IS INITIAL.
reports = classname.
ENDIF.
TRANSLATE reports TO LOWER CASE.
TRANSLATE reports USING '/.'.
IF NOT save IS INITIAL OR
NOT savedspl IS INITIAL.
CONCATENATE savepath reports suffix '.txt' INTO filename.
PERFORM download TABLES i_repsrc USING filename
'Source'(003).
IF NOT i_reptxt[] IS INITIAL.
CONCATENATE savepath reports suffix '_txt.txt' INTO filename.
PERFORM download TABLES i_reptxt USING filename
'Text elements'(004).
ENDIF.
ENDIF.
SELECT include FROM d010inc INTO TABLE i_inc
WHERE master = eu_key-name.
DELETE i_inc WHERE table_line(1) = '<'.
DELETE i_inc WHERE table_line(1) = '>'.
DELETE i_inc WHERE table_line = 'DB__SSEL'.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_inc[] IS INITIAL.
CONCATENATE savepath reports suffix '_inc.txt' INTO filename.
PERFORM download TABLES i_inc USING filename
'Include List'(033).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_tmd[] IS INITIAL.
CONCATENATE savepath reports suffix '_tmd.txt' INTO filename.
PERFORM download TABLES i_tmd USING filename
'Methods List'(048).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cls[] IS INITIAL.
CONCATENATE savepath reports suffix '_cls.txt' INTO filename.
PERFORM download TABLES i_cls USING filename
'Class Entry'(050).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cdf[] IS INITIAL.
CONCATENATE savepath reports suffix '_cdf.txt' INTO filename.
PERFORM download TABLES i_cdf USING filename
'Class Definition'(051).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_clx[] IS INITIAL.
CONCATENATE savepath reports suffix '_clx.txt' INTO filename.
PERFORM download TABLES i_clx USING filename
'Class Remote Info'(052).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_clt[] IS INITIAL.
CONCATENATE savepath reports suffix '_clt.txt' INTO filename.
PERFORM download TABLES i_clt USING filename
'Class Description'(053).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cmr[] IS INITIAL.
CONCATENATE savepath reports suffix '_cmr.txt' INTO filename.
PERFORM download TABLES i_cmr USING filename
'Class Meta Relations'(054).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cmp[] IS INITIAL.
CONCATENATE savepath reports suffix '_cmp.txt' INTO filename.
PERFORM download TABLES i_cmp USING filename
'Class Components'(055).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cmd_t[] IS INITIAL.
CONCATENATE savepath reports suffix '_cmd.txt' INTO filename.
PERFORM download TABLES i_cmd_t USING filename
'Class Components Definitions'(056).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cmx[] IS INITIAL.
CONCATENATE savepath reports suffix '_cmx.txt' INTO filename.
PERFORM download TABLES i_cmx USING filename
'Class Components Remote Infos'(057).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_cmt[] IS INITIAL.
CONCATENATE savepath reports suffix '_cmt.txt' INTO filename.
PERFORM download TABLES i_cmt USING filename
'Class Components Descriptions'(058).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_irl[] IS INITIAL.
CONCATENATE savepath reports suffix '_irl.txt' INTO filename.
PERFORM download TABLES i_irl USING filename
'Class Components Relation Types'(059).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_mat[] IS INITIAL.
CONCATENATE savepath reports suffix '_mat.txt' INTO filename.
PERFORM download TABLES i_mat USING filename
'Class Mapping Attributes'(060).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_mac[] IS INITIAL.
CONCATENATE savepath reports suffix '_mac.txt' INTO filename.
PERFORM download TABLES i_mac USING filename
'Class Mapping Classes'(061).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_red[] IS INITIAL.
CONCATENATE savepath reports suffix '_red.txt' INTO filename.
PERFORM download TABLES i_red USING filename
'Class Redefinitions'(062).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_frd[] IS INITIAL.
CONCATENATE savepath reports suffix '_frd.txt' INTO filename.
PERFORM download TABLES i_frd USING filename
'Class Friends'(063).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_tpl[] IS INITIAL.
CONCATENATE savepath reports suffix '_tpl.txt' INTO filename.
PERFORM download TABLES i_tpl USING filename
'Class Type-Pools'(064).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_sco[] IS INITIAL.
CONCATENATE savepath reports suffix '_sco.txt' INTO filename.
PERFORM download TABLES i_sco USING filename
'Class Sub Components'(065).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_scd_t[] IS INITIAL.
CONCATENATE savepath reports suffix '_scd.txt' INTO filename.
PERFORM download TABLES i_scd_t USING filename
'Class Sub Components Definitions'(066).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_scx[] IS INITIAL.
CONCATENATE savepath reports suffix '_scx.txt' INTO filename.
PERFORM download TABLES i_scx USING filename
'Class Sub Components Remote Infos'(067).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_sct[] IS INITIAL.
CONCATENATE savepath reports suffix '_sct.txt' INTO filename.
PERFORM download TABLES i_sct USING filename
'Class Sub Components Descriptions'(068).
ENDIF.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_tfd[] IS INITIAL.
CONCATENATE savepath reports suffix '_tfd.txt' INTO filename.
PERFORM download TABLES i_tfd USING filename
'Function List'(049).
ENDIF.
IF NOT i_inc[] IS INITIAL.
LOOP AT i_inc.
REFRESH: i_reptx, i_reptxt.
READ REPORT i_inc INTO i_repsrc.
IF codeonly <> 'X'.
READ TEXTPOOL i_inc INTO i_reptx.
ENDIF.
LOOP AT i_reptx.
MOVE-CORRESPONDING i_reptx TO i_reptxt.
APPEND i_reptxt.
ENDLOOP.
IF NOT display IS INITIAL OR
NOT savedspl IS INITIAL.
PERFORM show_inc.
ENDIF.
TRANSLATE i_inc TO LOWER CASE.
TRANSLATE i_inc USING '/.'.
IF NOT save IS INITIAL OR
NOT savedspl IS INITIAL.
CONCATENATE savepath i_inc suffix '.txt' INTO filename.
PERFORM download TABLES i_repsrc USING filename
'Include Source'(032).
IF NOT i_reptxt[] IS INITIAL.
CONCATENATE savepath i_inc suffix '_txt.txt'
INTO filename.
PERFORM download TABLES i_reptxt USING filename
'Text elements'(004).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
IF NOT i_d020t[] IS INITIAL.
LOOP AT i_d020t.
IMPORT DYNPRO hdr fld src mat ID i_d020t.
CALL FUNCTION 'RS_SCRP_UPGRADE_DYNPRO'
TABLES
f = fld
m = mat
CHANGING
h = hdr.
IF src[] IS INITIAL.
DELETE i_d020t.
CONTINUE.
ENDIF.
CLEAR src.
READ TABLE src INDEX 1.
IF src-line CS 'Do not change'.
DELETE i_d020t.
CONTINUE.
ENDIF.
CALL FUNCTION 'RS_SCRP_GET_SCREEN_INFOS'
EXPORTING
dynnr = hdr-dnum
progname = hdr-prog
with_fieldlist = 'X'
IMPORTING
lines = lines
columns = rows
TABLES
fieldlist = fld
EXCEPTIONS
dynpro_does_not_exist = 01
no_field_list = 02.
hdr-bzmx = lines.
hdr-bzbr = rows.
IF NOT display IS INITIAL OR
NOT savedspl IS INITIAL.
PERFORM show_dyn.
ENDIF.
IF NOT save IS INITIAL OR
NOT savedspl IS INITIAL.
PERFORM dynpro_download.
ENDIF.
ENDLOOP.
IF ( NOT save IS INITIAL OR
NOT savedspl IS INITIAL ) AND
NOT i_d020t[] IS INITIAL.
CONCATENATE savepath reports suffix '_dyn.txt' INTO filename.
PERFORM download TABLES i_d020t USING filename
'Dynpro List'(040).
ENDIF.
ENDIF.
IF NOT save IS INITIAL OR
NOT savedspl IS INITIAL.
IF NOT sta4[] IS INITIAL.
CONCATENATE savepath reports suffix '_sta.txt' INTO filename.
PERFORM download TABLES sta4 USING filename
'GUI Status'(013).
ENDIF.
IF NOT ctx4[] IS INITIAL.
CONCATENATE savepath reports suffix '_ctx.txt' INTO filename.
PERFORM download TABLES ctx4 USING filename
'Object Codes'(045).
ENDIF.
IF NOT fun4[] IS INITIAL.
CONCATENATE savepath reports suffix '_fun.txt' INTO filename.
PERFORM download TABLES fun4 USING filename
'Function Texts'(014).
ENDIF.
IF NOT men4[] IS INITIAL.
CONCATENATE savepath reports suffix '_men.txt' INTO filename.
PERFORM download TABLES men4 USING filename
'Menus'(015).
ENDIF.
IF NOT tit4[] IS INITIAL.
CONCATENATE savepath reports suffix '_sti.txt' INTO filename.
PERFORM download TABLES tit4 USING filename
'Title Codes'(042).
ENDIF.
IF NOT mtx4[] IS INITIAL.
CONCATENATE savepath reports suffix '_mtx.txt' INTO filename.
PERFORM download TABLES mtx4 USING filename
'Menu Texts'(016).
ENDIF.
IF NOT act4[] IS INITIAL.
CONCATENATE savepath reports suffix '_act.txt' INTO filename.
PERFORM download TABLES act4 USING filename
'Menu Bars'(047).
ENDIF.
IF NOT but4[] IS INITIAL.
CONCATENATE savepath reports suffix '_but.txt' INTO filename.
PERFORM download TABLES but4 USING filename
'Push Buttons'(018).
ENDIF.
IF NOT pfk4[] IS INITIAL.
CONCATENATE savepath reports suffix '_pfk.txt' INTO filename.
PERFORM download TABLES pfk4 USING filename
'PF Keys'(019).
ENDIF.
IF NOT adm4 IS INITIAL.
APPEND adm4 TO i_adm4.
CONCATENATE savepath reports suffix '_adm.txt' INTO filename.
PERFORM download TABLES i_adm4 USING filename
'Management Information'(043).
ENDIF.
IF NOT set4[] IS INITIAL.
CONCATENATE savepath reports suffix '_set.txt' INTO filename.
PERFORM download TABLES set4 USING filename
'Function Sets'(020).
ENDIF.
IF NOT stx4[] IS INITIAL.
CONCATENATE savepath reports suffix '_stx.txt' INTO filename.
PERFORM download TABLES stx4 USING filename
'Status Texts'(023).
ENDIF.
IF NOT doc4[] IS INITIAL.
CONCATENATE savepath reports suffix '_doc.txt' INTO filename.
PERFORM download TABLES doc4 USING filename
'Status Short Texts'(024).
ENDIF.
IF NOT biv46c[] IS INITIAL.
CONCATENATE savepath reports suffix '_biv.txt' INTO filename.
PERFORM download TABLES biv46c USING filename
'Invariant Functions'(048).
ENDIF.
IF NOT tit[] IS INITIAL.
CONCATENATE savepath reports suffix '_tit.txt' INTO filename.
PERFORM download TABLES tit USING filename
'Title Bars'(030).
ENDIF.
ENDIF.
ULINE.
ENDLOOP.
ENDIF.
REFRESH reports.
*& Form DOWNLOAD
FORM download TABLES tabelle
USING value(filename)
component.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
filename = filename
filetype = 'ASC'
IMPORTING
FILELENGTH =
TABLES
data_tab = tabelle
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
OTHERS = 5.
IF reports IS INITIAL.
WRITE: / appls.
ELSE.
WRITE: / reports.
ENDIF.
WRITE: /(20) component.
IF sy-subrc = 0.
WRITE: 'successfully downloaded'(001).
PERFORM getfilename USING filename
CHANGING filename.
WRITE: '->', filename.
ELSE.
WRITE: 'not downloaded, RC ='(002), sy-subrc.
ENDIF.
ENDFORM. " DOWNLOAD
*& Form FILESELECTOR
FORM fileselector.
DATA: repname(250).
DATA: fdpos(2) TYPE p.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
def_path = path
mask = ',.txt,.txt.'
mode = 'O'
TITLE = ' '
IMPORTING
filename = file
RC =
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
subrc = sy-subrc.
path = file.
CLEAR: sy-fdpos, sy-subrc.
fdpos = 1.
WHILE sy-subrc = 0.
fdpos = fdpos + sy-fdpos + 1.
SEARCH path FOR delim STARTING AT fdpos.
ENDWHILE.
fdpos = fdpos - 1.
path = path(fdpos).
repname = file.
CLEAR sy-subrc.
WHILE sy-subrc = 0.
SHIFT repname LEFT.
SHIFT repname LEFT UP TO delim.
ENDWHILE.
SHIFT repname RIGHT UP TO '.'.
SHIFT repname RIGHT.
SHIFT repname LEFT DELETING LEADING space.
TRANSLATE repname TO UPPER CASE.
reports = repname.
APPEND reports.
ENDFORM. " FILESELECTOR
*& Form LS
FORM ls.
TYPES: c80(80).
DATA: dirtab TYPE STANDARD TABLE OF c80 WITH HEADER LINE.
DATA: datei TYPE string.
DATA: i LIKE sy-tabix.
DATA: endtime LIKE sy-uzeit.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
DOCUMENT = ' '
cd = path
commandline = command
INFORM = ' '
program = shell
STAT = ' '
WINID = ' '
OSMAC_SCRIPT = ' '
OSMAC_CREATOR = ' '
WIN16_EXT = ' '
EXEC_RC = ' '
IMPORTING
RBUFF =
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
OTHERS = 5.
IF sy-subrc NE 0.
MESSAGE e001(pc).
Error when executing the WS program
ENDIF.
CONCATENATE path 'dir.tmp' INTO datei.
GET TIME.
endtime = sy-uzeit + 3.
WHILE sy-uzeit < endtime.
GET TIME.
ENDWHILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = datei
filetype = 'ASC'
IMPORTING
FILELENGTH =
TABLES
data_tab = dirtab
EXCEPTIONS
file_read_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
OTHERS = 5.
IF sy-subrc NE 0.
MESSAGE e001(pc).
Error when executing the WS program
ENDIF.
REFRESH reports.
i = 1.
DO.
SEARCH dirtab FOR '.txt' STARTING AT i.
IF sy-subrc NE 0.
EXIT.
ENDIF.
READ TABLE dirtab INDEX sy-tabix.
i = sy-tabix + 1.
CHECK dirtab NS 'txt_.txt'.
SHIFT dirtab LEFT UP TO space.
SHIFT dirtab LEFT DELETING LEADING space.
SHIFT dirtab LEFT UP TO space.
SHIFT dirtab LEFT DELETING LEADING space.
SHIFT dirtab LEFT UP TO space.
SHIFT dirtab RIGHT UP TO '.'.
SHIFT dirtab RIGHT.
SHIFT dirtab LEFT DELETING LEADING space.
IF NOT dirtab IS INITIAL.
TRANSLATE dirtab TO LOWER CASE.
APPEND dirtab TO reports.
ENDIF.
ENDDO.
SORT reports.
DELETE ADJACENT DUPLICATES FROM reports.
ENDFORM. " LS
*& Form SHOW_DYN
FORM show_dyn.
Printing Dynpro data
Header for Dynpro
FORMAT COLOR COL_TOTAL.
WRITE: / 'Dynpro header', AT sy-linsz ''.
FORMAT COLOR COL_NORMAL.
WRITE: / 'Program:', 30 hdr-prog, AT sy-linsz '',
/ 'Dynpro:', 30 hdr-dnum, AT sy-linsz '',
/ 'Follow-up dynpro:', 30 hdr-fnum, AT sy-linsz ''.
ULINE.
Print field list
FORMAT COLOR COL_TOTAL.
WRITE: / 'Field list' COLOR COL_TOTAL, AT sy-linsz ''.
FORMAT COLOR COL_HEADING.
WRITE: / 'Field',
25 'Line',
30 'Column',
37 'TYPE',
42 'LOOPTyp',
50 'DDIC',
55 'FormByte', AT sy-linsz ''.
CALL FUNCTION 'RS_SCRP_FIELDS_RAW_TO_CHAR'
TABLES
fields_int = fld
fields_char = fields_char
EXCEPTIONS
OTHERS = 1.
FORMAT COLOR COL_NORMAL.
LOOP AT fields_char.
WRITE: /(24) fields_char-feldname,
25 fields_char-line,
30 fields_char-coln,
37 fields_char-feldformat,
42 fields_char-looptype,
50 fields_char-inttyp,
55 fields_char-fmb1,
58 fields_char-fmb2.
ENDLOOP.
ULINE.
Display logic
FORMAT COLOR COL_TOTAL.
WRITE: / 'Logic', AT sy-linsz ''.
FORMAT COLOR COL_NORMAL.
LOOP AT src.
WRITE: / src-line.
ENDLOOP.
ULINE.
SKIP.
Display matchcode data
FORMAT COLOR COL_TOTAL.
WRITE: / 'Matchcode data', AT sy-linsz ''.
FORMAT COLOR COL_NORMAL.
LOOP AT mat.
WRITE: /(80) mat.
ENDLOOP.
IF sy-subrc NE 0.
WRITE / ' no matchcode files available ' COLOR COL_NEGATIVE.
ENDIF.
NEW-PAGE.
ENDFORM. " SHOW_DYN
*& Form SHOW_REP
FORM show_rep.
FORMAT COLOR COL_TOTAL.
WRITE: / 'Program:', reports, AT sy-linsz ''.
FORMAT COLOR COL_BACKGROUND.
LOOP AT i_repsrc.
WRITE: / i_repsrc.
ENDLOOP.
ULINE.
FORMAT COLOR COL_TOTAL.
WRITE: / 'Text elements for program:', reports, AT sy-linsz ''.
FORMAT COLOR COL_HEADING.
WRITE: / 'Type',
5 'Key',
20 'Length',
30 'Text', AT sy-linsz ''.
FORMAT COLOR COL_NORMAL.
LOOP AT i_reptxt.
WRITE: / i_reptxt-id,
5 i_reptxt-key,
20(4) i_reptxt-length,
30(80) i_reptxt-entry.
ENDLOOP.
NEW-PAGE.
ENDFORM. " SHOW_REP
*& Form SHOW_INC
FORM show_inc.
FORMAT COLOR COL_TOTAL.
WRITE: / 'Include:', i_inc, AT sy-linsz ''.
FORMAT COLOR COL_BACKGROUND.
LOOP AT i_repsrc.
WRITE: / i_repsrc.
ENDLOOP.
ULINE.
FORMAT COLOR COL_TOTAL.
WRITE: / 'Text elements for include:', i_inc, AT sy-linsz ''.
FORMAT COLOR COL_HEADING.
WRITE: / 'Type',
5 'Key',
20 'Length',
30 'Text', AT sy-linsz ''.
FORMAT COLOR COL_NORMAL.
LOOP AT i_reptxt.
WRITE: / i_reptxt-id,
5 i_reptxt-key,
20(4) i_reptxt-length,
30(80) i_reptxt-entry.
ENDLOOP.
NEW-PAGE.
ENDFORM. " SHOW_INC
*& Form DYNPRO_DOWNLOAD
& -
How to create a module pool program
Dear Guru
I want to know know how to create a module pool program from se80 step by step. I want to know the steps where i will get the four includes like form routines, PAI, PBO, and global data please its very urgent.
Thanks & regards
Saifur Rahamanhi Saifur Rahaman,
goto se80 then click find program,
next u want any name of the program enter as,
Attribute type as find Module pool click it.
next u want any package and save and activate.
program name with create screen with any number then
click layout and u want any object and save , actived.
click flow logic , four types as PBO and PAI and POV, POH.
PBO---> Trigger is before screen.
its applied for display screen and inactive or no display screen only
PAI--->Trigger is after screen
when u want button then its processed.
POV--> Value requested for F4.
POH-->Help requested for F1.
Reward if useful,
S.Suresh. -
How to copy a module pool program
Hi All,
How to copy a module pool program from one system (Organization) to other system(organization) i.e. from one company to other company. My requirement is to how to download & upload module pool program.
Regards,
Rajesh VasudevaHi,
Check the below link
[How to DOWNLOAD a whole module pool program????]
[Download the Module pool program]
Cheers,
Surinder -
How to Upload a module Pool Program in SAP
Hello All,
I have downloaded My Program Using Report REPTRAN. Now i want to know how we can Upload the Module pool program and Reports in SAP .Hi Ram,
Use open source project SAPLINK for downloading objects into files and uploading them into SAP. I think REPTRAN is only to download the source code.
Regards,
Shravan
Maybe you are looking for
-
I have two apple Ids, how do I consoliidate into one Id?
I have two apple ids. One for the apple store and one for the icloud and newstand. How can i concsolidate the two ids into one ID. One is associated with my Icloud and has payed icould stroage. The other id is my pre os5 apple store id. They have
-
Why i cant restore my iphone 5
Why when I put restore my iphone tells me that "my phone can not be chosen for that"
-
How to edit working hours in the calendar rules
Hi.. Does anybody know how to change the working hours in the calendar rule editor as in mine case those working hours are already frozen. Ritu
-
hi friends, my company have 5 plants and 24 C& F in india. my doubt is how i configure these 24 C & f in sap system?? is these C & F's are depot's or Plants?? tell me the process floe of depot sales and export sales... thanks mehar
-
Greetings, everyone! I have some problems configuring EM after installing oracle database. I got through some minor problems ( listener availability, remote password file) with your ( searching through forum) help, but now i'm stuck in a problem whic