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

Calling module pool transaction with default button selection

jagesh_lakdawala
Active Participant
0 Likes
2,704

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
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,429

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
Read only

Former Member
0 Likes
1,429

hi,

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

Read only

0 Likes
1,429

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

Read only

0 Likes
1,429

you can generate FM for that bdc and use FM.

or use SET and GET

Read only

0 Likes
1,429

Hi

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

it will help me.

Regards,

Jagesh

Read only

0 Likes
1,429

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.

Read only

VenkatRamesh_V
Active Contributor
0 Likes
1,429

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,430

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

Read only

0 Likes
1,429

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