Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Returning value from called transaction

Former Member
0 Likes
4,111

Hi All,

I have a requirement where in i have to call a standard transaction from my modulepool program and return the value from the standard transaction to my program.

Suppose if i call change customer master or creates sales order transactions from my module pool program, i want to know which customer has been changed or which sales order has been created. Pls let me know how to solve this.

Thanks,

Raju

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,213

Hello,

These fields have a parameter id, use it as it will hold the value of the last changed value.

Say for a sales order the parameter id is AUN, so after the call transaction when you return to your module pool program us the GET PARAMETER ID statement to fetch the value of the changed sales order from the id AUN into a variable.

No the variable holds the value of the last changed order.

Hope this solves your issue.

Regards,

Sachin

3 REPLIES 3
Read only

vinod_vemuru2
Active Contributor
0 Likes
2,213

Hi,

Just use statement CALL TRANSACTION 'Tcode' and check the variable sy-msgv1 after you returned back. It will contain the object key of the called transaction if it is successfully saved.

Other way could be, CALL TRANSACTION 'Tcode' USING bdcdata MODE 'E' MESSAGES INTO bdcmessages.

In bdcdata populate the screen data only for first screen. From messages tab you can get the object key. Ideally this should work fine.

Thanks,

Vinod.

Read only

Former Member
0 Likes
2,214

Hello,

These fields have a parameter id, use it as it will hold the value of the last changed value.

Say for a sales order the parameter id is AUN, so after the call transaction when you return to your module pool program us the GET PARAMETER ID statement to fetch the value of the changed sales order from the id AUN into a variable.

No the variable holds the value of the last changed order.

Hope this solves your issue.

Regards,

Sachin

Read only

Former Member
0 Likes
2,213

Hi

Please refer the code mentioned below:

FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM

I_SELFIELD TYPE SLIS_SELFIELD.

DATA: F_SUBRC LIKE SY-SUBRC,

s_arseg like tab_arseg.

READ TABLE tab_arseg INDEX i_selfield-tabindex INTO s_arseg.

CASE F_UCOMM.

WHEN '&IC1'.

CASE i_SELFIELD-SEL_TAB_FIELD.

WHEN 'TAB_ARSEG-BELNR'.

CHECK NOT S_ARSEG-BELNR IS INITIAL.

SET PARAMETER ID 'RBN' FIELD S_ARSEG-BELNR.

SET PARAMETER ID 'GJR' FIELD S_ARSEG-GJAHR.

CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.

Give the parameter id of field name whose changes value , you want to capture.This is just an example

GET PARAMETER ID 'RBN' field gd_valueout.

ENDCASE.

ENDCASE.

ENDFORM.