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

BUG IN SET PARAMETER ID

Former Member
0 Likes
885

Hi,

i created one transaction "ZPNUM",it has one parameter in selection screen PERNR(personal Number)

i want to set parameter from another program

i am using this code,but it does not works.any body can help me

DATA : PERNR TYPE PA0001-PERNR VALUE '10000'.

SET PARAMETER ID 'PER' FIELD PERNR.

CALL TRANSACTION 'ZPNUM' .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
811

In the transaction ZPNUM program write this

initialization.

get parameter id 'PER' field pernr.

6 REPLIES 6
Read only

Former Member
0 Likes
811

Hi,

Here if you have set parameter id for this particular field,

Then in your transaction ZNUM,there in that field you have to get parameter id also to retain the value

using set parameter id.

Hope it helps

Regrds

Mansi

Read only

0 Likes
811

Sorry i am not clear,can u give me one example.

if you do so that will helps me a lot

Read only

0 Likes
811

Can you use the Submit:



DATA: BEGIN OF TAB1 OCCURS 0,
SELNAME(8),
KIND(1),
SIGN(1),
OPTION(2),
LOW(45),
HIGH(45),
END OF TAB1

TAB1-SELNAME = 'PERNR'. "Name of Parameter in ZPNUM
TAB1-KIND = 'P'.                  "Parameter Type
TAB1-SIGN = 'I'.
TAB1-OPTION = 'EQ'.
TAB1-HIGH = -Insert Value or Variables- 
APPEND TAB1.

SUBMIT ZPROGRAM* WITH SELECTION-TABLE TAB1 AND RETURN.

*Use the Program name of TC.

AA

Read only

Former Member
0 Likes
811

hi,

use get parameter id as well in znum transaction

also ,u can use IMPORT and EXPORT

EXPORT p_pernr

TO MEMORY ID 'VBE'.

CALL TRANSACTION 'ZNUM and skip first screen.

and in ZNUM PBO import

IMPORT p_pernr

FROM MEMORY ID 'VBE'.

thanks.

Read only

Former Member
0 Likes
812

In the transaction ZPNUM program write this

initialization.

get parameter id 'PER' field pernr.

Read only

Former Member
0 Likes
811

Hi,

As PERNR does not have any SET PARAMETER id, use can use EXPORT<field> TO MEMORY ID <id> and IMPORT <field> FROM MEMORY ID <id> options.

Export the PERNR value from calling program as below:

EXPORT pernr TO MEMORY ID 'PERNR'.

And in Called Program use IMPORT as below:

IMPORT pernr FROM MEMORY ID 'PERNR'.

Make sure that the Memory IDs you are using same in both programs.

Regards

SP Raj