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: 

GET/SET Parameters not working

former_member271795
Participant
0 Kudos

Hi

I have a problem in setting and receiving parameter id's

What I want to do is SET a value in a module in  the PBO of a screen then get the value to be used in a search help function

What I'm getting is a return code 4 when trying to do the GET

The code I'm using is

**** set parameter in the screen module

MODULE ZSETPARMS  OUTPUT..
data l_SUB type subty.
move P0102-SUBTY to l_sub.

SET PARAMETER ID 'ZSUB' Field l_sub

*****The get statement in the search help

  IF CALLCONTROL-STEP = 'PRESEL1'.

    data l_sub    type subty.

    data l_selopt type DDSHSELOPT.

    get parameter id 'ZSUB' field L_SUB..

The <pid> is registered in TPARA

Could anyone tell me where I'm going wrong

thanks

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Geoff,

If i understand the requirement correctly, you want to populate you F4 help values based on some other input in the screen.

When the user inputs the value & presses the F4 help the POV module is triggered & not the PBO, hence the GPA is returning SY-SUBRC = 4!

You need to use DYNP_VALUES_READ to read the data from the screen. Refer to the demo program DEMO_DYNPRO_F4_HELP_MODULE.

BR,

Suhas

PS: After inputting the data in the screen, press 'Enter' & then check if the GPA statement works

6 REPLIES 6

Former Member
0 Kudos

Hi,

Is your parameter created in table TPARA?

Regards,

Manu.

added: It seems it is, I didn't read your post completely...;) I cannot see anything wrong with your syntax, another alternative would be to use an export/import statement...

Message was edited by: Manu D'Haeyer

0 Kudos

Hi

The parameter id is created in TPARA

Former Member
0 Kudos

Dear goeff,

Please check wether the filed Declared Globally or not?

Regards,

siva rama krishna mohan G

former_member16553
Active Participant
0 Kudos

Hi

     Declare variable I_sub and L_sub in top include and try.

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Geoff,

If i understand the requirement correctly, you want to populate you F4 help values based on some other input in the screen.

When the user inputs the value & presses the F4 help the POV module is triggered & not the PBO, hence the GPA is returning SY-SUBRC = 4!

You need to use DYNP_VALUES_READ to read the data from the screen. Refer to the demo program DEMO_DYNPRO_F4_HELP_MODULE.

BR,

Suhas

PS: After inputting the data in the screen, press 'Enter' & then check if the GPA statement works

Former Member
0 Kudos

Hi Geoff,

From where you are calling search help function?

If from PAI then it won't work.

Try to set your parameter in PAI module and then use that parameter ID in your search help function, you will definitely get ....

I have used many time, even if you don't register your parameter ID in TPARA table then also you will get parameter ID data.

Try to debug your code and check whether your Search help FM is being call after executing SET PARAMETER ID 'ZSUB' Field l_sub or not.. Try something like that.

All the best.

Regards,

Rajesh Sadula.