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

internal table value pass with set/get

Former Member
0 Likes
2,945

Can we pass internal table from one transaction to another using set/get parameter..if so then how

or any other option is there..can any body suggest me with simple

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,454

Hi,

Instead of using SET/GET use EXPORT/IMPORT to transfer internal table.

Check this link, in this link I have posted two sample programs From program 1 I'm passing one internal table to another program by using EXPORT. and fetching that internal table in program 2 by using IMPORT.

Regards

Abhijeet

Can we pass internal table from one transaction to another using set/get parameter..if so then how

or any other option is there..can any body suggest me with simple

5 REPLIES 5
Read only

Former Member
0 Likes
1,454

Yes, you can do it.

Read only

0 Likes
1,454

I know it ios possible..but can u please explain me with simple coding, how to do it...

thanks

Read only

Former Member
0 Likes
1,454

Hi Kumar .,

You can Pass table pl Find Below sample code :

REPORT report1.

DATA text(10) TYPE c.

SELECTION-SCREEN BEGIN OF SCREEN 1100.

SELECT-OPTIONS: selcrit1 FOR text,

selcrit2 FOR text.

SELECTION-SCREEN END OF SCREEN 1100.

...

Calling program

REPORT report2.

DATA: text(10) TYPE c,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

          • Here RSPAR is the Internal table used to Pass table contents .

thanks

Sreenivas Reddy

Read only

Former Member
0 Likes
1,454

Hi,

GET

GET PARAMETER ID key FIELD f.

Effect

Transfers the value stored under the key pid from the global user-related SAP memory memory to the field f .

The key pid must consist of three characters. For an overview of the keys (parameters) used, refer to the SAP system description or the appropriate function in the ABAP/4 Development Workbench.

The return code value is set as follows:

SY-SUBRC = 0 A value was read from SAP memory.

SY_SUBRC = 4 No value was found in SAP memory under the specified key

Notes

The global user-related SAP memory is available to each user for the entire duration of a terminal session. For this reason, set values are retained when you leave a program.

The SAP memory should not be used for intermediate storage, since a user's parallel sessions use the same global memory.

Example

Read the program name from SAP memory:

DATA : REPID(8).

GET PARAMETER ID 'RID' FIELD REPID.

SET

SET PARAMETER ID pid FIELD f.

Effect

Writes the contents of the field f to the global SAP memory under the key pid . If the key already contains a value, it is overwritten.

The key pid must consist of three characters. You can find a list of the keys (parameters) used in the SAP system description or in the ABAP/4 Development Workbench.

Notes

The global SAP memory remains available to the user during the entire terminal session. This means that set values are retained when you leave a program.

You should not use the SAP memory for temporary storage of values because other modes use the same global memory.

If you need a new key (parameter), you can create this in the ABAP/4 Development Workbench.

Example

DATA: REPID(8) VALUE 'RFSCHU01'.

SET PARAMETER ID 'RID' FIELD REPID.

Sets the program name, e.g. for transfer to another program.

Notes

Runtime errors

SET_PARAMETER_ID_TOO_LONG : Key longer than 3 characters.

SET_PARAMETER_ID_WRONG_TYPE : Key neither type C nor type N.

SET_PARAMETER_VALUE_TOO_LONG : Value longer than 250 characters.

Like above ther will syntax for internal table .Use that

Read only

Former Member
0 Likes
1,455

Hi,

Instead of using SET/GET use EXPORT/IMPORT to transfer internal table.

Check this link, in this link I have posted two sample programs From program 1 I'm passing one internal table to another program by using EXPORT. and fetching that internal table in program 2 by using IMPORT.

Regards

Abhijeet