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

Program Parameters

Former Member
0 Likes
855

I try to define internal table in parameters but get error message "the nested data type is not allowed", please see below code and help to give me the solution.

types: prodnr(3) type n.

types: pnr TYPE STANDARD TABLE OF prodnr WITH DEFAULT KEY.

PARAMETER: lt_prodnr type pnr.

Thanks!

Yu

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
822

You can not use an internal table as a parameter.

Regards,

Rich Heilman

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
823

You can not use an internal table as a parameter.

Regards,

Rich Heilman

Read only

0 Likes
822

What is your overall requirement.

Regards,

Rich Heilman

Read only

0 Likes
822

HI,

u can give directly....

Data prodnr(3) type n.

parameters: pa_prodnr like prodnr.

Regards

Cnu

Read only

0 Likes
822

oic! Thanks Rich.

Originally I want to define internal table PARAMETERS in the program with NO-DISPLAY and then SUBMIT this program by WITH v1 = value1...

Then if I want to pass internal table to the program which will be submitted in background, how can I do?

Yu

Read only

0 Likes
822

I think the easiest way would be to have the submitting program export the internal table to memory and have the submitted program import it.

Rob

Read only

0 Likes
822

You can do this using the EXPORT and IMPORT statements.

data: itab type table of mara.


export itab = itab to memory id 'ZRICHTEST'.

SUBMIT zrich_0002 and return.

Then in the submitted program......



data: itab type table of mara.

import  itab = itab from  memory id 'ZRICHTEST'.

loop at itab.

write:/ itab-matnr, itab-mtart.
endloop.


Regards,

Rich HEilman

Read only

Former Member
0 Likes
822

Hi Yu,

Try like this. Instead of Parameter use Data to define the field lt_prodnr.

types: prodnr(3) type n.

types: pnr TYPE STANDARD TABLE OF prodnr WITH DEFAULT KEY.

<b>DATA</b>: lt_prodnr type pnr.

This should work.

Reward points if helpful.

Regards,

Biju