Application Development 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: 

Pass a value to the input field in the standard tcode using module pool.

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

martin_roldan
Participant
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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.


0 Kudos

Hi,

Is there a possibility to set the value of parameter ID from my ABAP program local variable(lv_tanum)?

Regards,

Vineela.

0 Kudos

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.

martin_roldan
Participant
0 Kudos

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

former_member184867
Active Contributor
0 Kudos

Hi Vineela,

Can you do a CALL TRANSACTION <TCODE> USING <BDC_DATA>.

Please have a look here &quot;OPTIONS&quot; in CALL TRANSACTION | SCN

Regards,

Atanu