‎2008 Feb 21 10:25 PM
Hello friends,
I had developed an abap program (PROG01) wich asks to enter dates and shows some comercial documents. Now I need to develop another abap program (PROG02) wich should call PROG01, through 'call transaction' and 'set parameter id' sentence, and then show some documents.
I have donde this before, where PROG02 was transaction IW33 and parameter id was ANR, no problem with that.
But now, when I go to F1 (help) to see parameter id for my entrance fields (dates) in my PROG01, there is nothing there. So the entrance fields, has no PARAMETER ID. So I have no idea how to call PROG01 from PROG02.
Is there any way to set parameter ids to my entrance fields in PROG01??? Or another way to use call transaction, with set parameter??
Thanks a lot,
Javier
‎2008 Feb 21 10:29 PM
Hi.
Use the following code:
Submit prog01
WITH field1 = value1
WITH field2 = value2
AND RETURN. " If you want it to return to PROG02
field1 is the name of the selection screen field, and value1 is the value for it.
Guy.
‎2008 Feb 21 10:28 PM
Hi,
You can populate the BDC data and then call transaction using the bdc data.
You can record the BDC using transaction SHDB.
OR
If it is a report..THen use the SUBMIT statement.
Thanks
Naren
‎2008 Feb 21 10:29 PM
Hi.
Use the following code:
Submit prog01
WITH field1 = value1
WITH field2 = value2
AND RETURN. " If you want it to return to PROG02
field1 is the name of the selection screen field, and value1 is the value for it.
Guy.
‎2008 Feb 22 12:03 AM
Thanks Guy,
I tried this and it works, but I have another requirement I need to solve.
In the first progam (PROG01) I made some selects and I have a internal table with data from diferent tables.
So this data, I need to pass to PROG02, so this way I don't have to make same selects again.
Is there any way to do this??
‎2008 Feb 22 12:50 AM
‎2008 Feb 22 12:52 AM
Export the internal table to memory in PROG1 and Import it in
PROG2.
Look at IMPORT and EXPORT commands in ABAP Help.
Regards
Sudhir Atluru