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

SET/GET parameter

former_member429372
Participant
0 Likes
2,416

Hi,

In one of my module pool in one include I have defined the parameter id and the same is called in another report as follows. But the parameter doesn't pass any values. Pls help to sort out this Issue.

SET PARAMETER ID 'ZLC' FIELD ZLCNO.

SUBMIT ZXXXX via SELECTION-SCREEN AND RETURN.

in the report ZXXXX i have called the parameter.

GET PARAMETER ID 'ZLC' FIELD ZLCN.

Here both the fields ZLCNO & ZLCN is of char(20).

Regards

SK

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
2,080

First

1. Create a entry for paramter in TPARA table

2. double click on the field in the module pool ( u cn find attributes) and maintain the parameter

3. In the report while creating selection input declarea like the the following


 PARAMETERS zcln(20) TYPE c MEMORY ID zlc. " (ZLC is your memory id)

a®

14 REPLIES 14
Read only

former_member194669
Active Contributor
0 Likes
2,081

First

1. Create a entry for paramter in TPARA table

2. double click on the field in the module pool ( u cn find attributes) and maintain the parameter

3. In the report while creating selection input declarea like the the following


 PARAMETERS zcln(20) TYPE c MEMORY ID zlc. " (ZLC is your memory id)

a®

Read only

0 Likes
2,080

Thanks,

It works, but the parameter is not getting refresh in the second time. It is showing the same value when the report is called for the second time. Is there any way to clear the memory id/ parameter id before passing value.

Regards

SK

Read only

0 Likes
2,080

Hi,

Clear your FIELD value after using GET PARAMETER.

Regards.

Ankur

Read only

0 Likes
2,080

Use


free memory id 'ZLC'.

a®

Read only

0 Likes
2,080

Hi,

Even if after giving 'free memory id 'ZLC'' the memory id is not clear. Pls help me to sort out this issue.

Read only

0 Likes
2,080

1). In PBO of your module pool

Give it as


free memory id 'ZLC'.

then in report after the get memory from this variable

again call the same as free memory

a®

Read only

0 Likes
2,080

Sorry Sir, It dosn't works.

Regards

SK

Read only

0 Likes
2,080

Hi,

Clear that field and SET its parameter with cleared field again after GET PARAMETER.

Hope it works.

Regards,

Ankur.

Read only

0 Likes
2,080

Hi, Kumar

Please Check with the bellow code.

set PARAMETER ID 'ZLC' FIELD ''.

Hope will solve out.

Thanks and Regards,

Faisal

Read only

0 Likes
2,080

Hi,

The problem was while calling the parameter id in the report using 'parameters' addtionally I have given 'NO-DISPLAY'. When I removed this it works fine. But I don't want to show as a selection parameter as it can changed in runtime.

Regards

SK

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,080

Then you can hide the param by passing SCREEN-ACTIVE = 0 in the LOOP AT SCREEN...ENDLOOP block.

Check in SDN for details.

Read only

Former Member
0 Likes
2,080

Hi Dinesh,

Do this:

(The program below is writing onto SAP Memory)

data: var1(10) type C VALUE 'sample'.

SET PARAMETER ID 'Z02_VAR1' FIELD VAR1.

(The below program reads from SAP Memory)

DATA: para TYPE tpara-paramid VALUE 'Z02_VAR1'.

GET PARAMETER ID para FIELD prog.'

This works.

Regards,

Pranaam.

Read only

Former Member
0 Likes
2,080

Hi,

You can do one thing right after GET use SET statement with Intial value. This will reset PARAMETER value again to initial.

Regards,

Sarbpreet

Read only

former_member194669
Active Contributor
0 Likes
2,080

Then try to do


loop at screen.
 screen-active
..
..
endloop.

I think this u need to do in INITIALIZATION even

a®