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: 

Calling module pool transaction with default button selection

jagesh_lakdawala
Active Participant
0 Kudos

Hi Experts,

I am working on SAP ECC 6.0 system. there is a one Custom module pool program(Transaction code Z1 assume, first screen 1001).

this first screen having the 4 input fields and three buttons lets say for CREATE, CHANGE and DISPLAY.

I have another custom development which displays the output in ALV format to the user, its transaction code is Z2.

Now my requirement is to call transaction Z1 first screen 1001 from transaction Z2, basically when user double click in ALV Output Row from Z2 Transaction then transaction Z1 is to be called.

moreover it is also required to pass the selected row's key fields to the input field of Z1 screen 1001 and then its PAI module is to be triggered for the DISPLAY button selection automatically (that means automatic DISPLAY button click).

purpose of this requirement is to display the Details information to the user which is available in Transaction Z1 second screen 1002  when he double click the ALV row.

just wondering is it possible or not, if possible then please suggest.

Regards,

Jagesh

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

First add PARAMETER IDs to your current input fields of initial screen. Create another PARAMETER ID for OK_CODE.

  • In the PBO of the called transaction, create an initial transaction module, there get the memory id and copy to the input fields, and if the PARAMETER ID for ok_code is not initial, execute a SUPPRESS DIALOG statement.
    In the PAI, before checking OK_CODE, fill from the received PARAMETER ID if not initial (as OK_CODE would now contains the value associated to ENTER)
    Depending on your transaction logic flow, you may have also to trigger a LEAVE TRANSACTION statement when program gets back to initial screen for a second time
  • in the caller - SET PARAMETER ID for the fields and ok_code


Regards,

Raymond

8 REPLIES 8

Former Member
0 Kudos

hi,

write bdc call transaction for z1 and use it z2 where ur double clicking(run bdc for display button).

0 Kudos

HI,

Thanks for your reply

BDC option I am aware of, disadvantage of this approach is user may change the OK _CODE value at runtime and can go into edit mode though chances are very rare..

is there any approach then please suggest.

Regards,

Jagesh

0 Kudos

you can generate FM for that bdc and use FM.

or use SET and GET

0 Kudos

Hi

can you please elaborate on FM use and also on SET/GET parameters approach.

it will help me.

Regards,

Jagesh

0 Kudos

After recording in SHDB tcode then select ur recording and then we have function module at right corner of shdb.

click on it ,give fm name and fg and text so that FM is created .

now you can use it in your program.

GET CURSOR FIELD fnam VALUE fval.

SET parameter <id name>  field fval.

call transaction <tcode> and skip first screen.

VenkatRamesh_V
Active Contributor
0 Kudos

Hi jagesh,

In Module pool,

Double click the field.

In Parameter ID tab  Declare the variable,

In ALV,

User Command,

pass the Input values to the Same parameter ID, and chek it.

Regards,

Venkat.

raymond_giuseppi
Active Contributor
0 Kudos

First add PARAMETER IDs to your current input fields of initial screen. Create another PARAMETER ID for OK_CODE.

  • In the PBO of the called transaction, create an initial transaction module, there get the memory id and copy to the input fields, and if the PARAMETER ID for ok_code is not initial, execute a SUPPRESS DIALOG statement.
    In the PAI, before checking OK_CODE, fill from the received PARAMETER ID if not initial (as OK_CODE would now contains the value associated to ENTER)
    Depending on your transaction logic flow, you may have also to trigger a LEAVE TRANSACTION statement when program gets back to initial screen for a second time
  • in the caller - SET PARAMETER ID for the fields and ok_code


Regards,

Raymond

0 Kudos

Hi,

sorry for the delay reply; I saw your message just today.

but yes I have applied the same solution as you mentioned.

I have used the SUPRESS DIALOG statement in PBO of the called Transaction based on the

condition.

Thank you very much for your time.

Regards,

Jagesh