2013 Dec 18 12:53 PM
Hello,
I have a requirement where I am developing a module pool program which is going to create a transfer order.If the transfer order is created then my module pool program should navigate directly to tcode LM05 with the generated transfer order number in it.
I have used CALL TRANSACTION LM05 to call the transaction.But how can I get the transfer order number in it populated?
2013 Dec 18 1:09 PM
Hi,
You can do this with a BDC. The TO number should go to field INP_100:
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-dynbegin = 'T'. | ||
| wa_bdcdata-fnam | = 'LM05'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | |
| wa_bdcdata-program = 'SAPLLMOB'. | |
| wa_bdcdata-dynpro = '2100'. | |
| wa_bdcdata-dynbegin = 'X'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'BDC_CURSOR'. | |
| wa_bdcdata-fval | = 'INP_100'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'BDC_OKCODE'. | |
| wa_bdcdata-fval | = '=NEXT'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'INP_100'. | |
| wa_bdcdata-fval | = v_tanum. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR it_messages. | |
| CALL TRANSACTION 'LM05' USING it_bdcdata | |
| OPTIONS FROM v_opt | |
| MESSAGES INTO it_messages. |
Martin
Hi,
You can do this with a BDC. The TO number should go to field INP_100:
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-dynbegin = 'T'. | ||
| wa_bdcdata-fnam | = 'LM05'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | |
| wa_bdcdata-program = 'SAPLLMOB'. | |
| wa_bdcdata-dynpro = '2100'. | |
| wa_bdcdata-dynbegin = 'X'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'BDC_CURSOR'. | |
| wa_bdcdata-fval | = 'INP_100'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'BDC_OKCODE'. | |
| wa_bdcdata-fval | = '=NEXT'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'INP_100'. | |
| wa_bdcdata-fval | = v_tanum. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR it_messages. | |
| CALL TRANSACTION 'LM05' USING it_bdcdata | |
| OPTIONS FROM v_opt | |
| MESSAGES INTO it_messages. |
Martin
2013 Dec 18 1:03 PM
I believe by using the SET parameter statement before the call transaction we can set the Transfer Order Number to the transaction LM05.
SET PARAMETER ID 'MLV' Field Transfer_Order_Number.
2013 Dec 18 2:06 PM
Hi,
Is there a possibility to set the value of parameter ID from my ABAP program local variable(lv_tanum)?
Regards,
Vineela.
2013 Dec 19 4:10 AM
Transfer_order_number refers to the variable we need to pass.So if lv_tanum is the variable number then pass the syntax as SET PARAMETER ID 'MLV' Field lv_tanum.
Hint : Whenever we call a module pool from another program,check the main screen fields you want to set with the F1 on the field.Probably the F1 documentation mentions the type of parameter ID (shown in bold above) to be called.If not provided int then take the Technical settings and check for the field " Parameter ID" and see the value there.Normally the value there refers to the field that needs to be passed so that when the screen/transaction is called,the default value is set.In some rare cases the parameter ID may differ from the the field information and we may need to do a debug or search to identify in the called program the parameter to be passed
EExample : Transaction VA01 : Do an F1 help on the "Order Type" to undestand it better
Although the thread is closed,I believe you can keep this option in mind to use it lateron with a similar requirement.
2013 Dec 18 1:09 PM
Hi,
You can do this with a BDC. The TO number should go to field INP_100:
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-dynbegin = 'T'. | ||
| wa_bdcdata-fnam | = 'LM05'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | |
| wa_bdcdata-program = 'SAPLLMOB'. | |
| wa_bdcdata-dynpro = '2100'. | |
| wa_bdcdata-dynbegin = 'X'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'BDC_CURSOR'. | |
| wa_bdcdata-fval | = 'INP_100'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'BDC_OKCODE'. | |
| wa_bdcdata-fval | = '=NEXT'. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR wa_bdcdata. | ||
| wa_bdcdata-fnam | = 'INP_100'. | |
| wa_bdcdata-fval | = v_tanum. | |
| INSERT wa_bdcdata INTO TABLE it_bdcdata. |
| CLEAR it_messages. | |
| CALL TRANSACTION 'LM05' USING it_bdcdata | |
| OPTIONS FROM v_opt | |
| MESSAGES INTO it_messages. |
Martin
2013 Dec 18 1:16 PM
Hi Vineela,
Can you do a CALL TRANSACTION <TCODE> USING <BDC_DATA>.
Please have a look here "OPTIONS" in CALL TRANSACTION | SCN
Regards,
Atanu
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |