on 10-26-2011 7:40 AM
Hi experts,
i am working on sap standard scripts.here i need to populate additional fields into form layout.so for that i am writing code in external subroutine pool and calling that subroutine from my script as below.
PERFORM GET_DATA IN PROGRAM xxxxxx
USING &INPUTS&
CHANGING &OUTPUTS&
ENDPERFORM
Here what my requirement is ,i need to pass internal table data from subroutine pool to script.By using 'Changing' parameter i can only pass one variable at a time.i tried writing write_form in subroutine pool .even though no use.please help me out.
Thanks and regards
Naresh bammidi
Hi,
Please check this thread:
Kr,
Manu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh,
In SAPScripts, you cannot pass back Internal tables from subroutine pool. You need to know exactly how many fields you want to pass.
ITCSY structure is used, and there cannot be internal table.
For LOOP based processign on tables, changes should be done in Print program itself directly. Check if you can do that, else check if you can create custom print program.
Regards,
Vivek
hi vivek,
thanks for ur reply.as you said before,i copied standard form and standard driver program and changes made in my 'z' program.when i execute my script in debugging mode still it's executing standard one only,.not my 'z' driver program.i assigned my standard program to script like this.
pagewindows>textelements of one of the windows -
Is this right way ?.please help me out.<removed by moderator>
Thanks and regards
Naresh bammdi.
Edited by: Thomas Zloch on Oct 27, 2011 9:19 AM
Hi Naresh,
>
> In SAPScripts, you cannot pass back Internal tables from subroutine pool. You need to know exactly how many fields you want to pass.
>
> ITCSY structure is used, and there cannot be internal table.
>
> For LOOP based processign on tables, changes should be done in Print program itself directly. Check if you can do that, else check if you can create custom print program.
>
> Regards,
> Vivek
You are right Vivek,
we can't pass internal table to form.alternative solution is using standard text <link to blocked site removed by moderator> or copying and changing the driver program according to our requirement.i changed the cheque printing driver program accordig to my requirement.problem resolved
Thanks alot vivek
Edited by: Thomas Zloch on Oct 28, 2011 10:47 AM
Hi,
Try Below command it may help you.
PERFORM get_data IN PROGRAM xxxxxx
USING &input&
CHANGING &outputs&
TABLES &tables&.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
It's not possible to transfer an internal table from sapscript to program, but also it's not possible to transfer in internal table from program to sapscript, I mean the sapscript can see the headerline of the internal table.
Now while running sapscript your main program should be still loeaded in memory, so you can try to get that internal table by field-symbols:
FIELD-SYMBOLS: <ITAB> TYPE TABLE.
DATA: TABNAME(30) TYPE C VALUE '(<program name>)<table name'.
ASSIGN (TABNAME) TO <ITAB>.
Max
you know that you can use MORE THAN ONE using and changing parameters?
E.G. think of a sales order print where you need to print 5 additional fields on item level which you have to get via an external perform and the info to get is based on matnr and werks.
it should look like:
perform get_additional_data in program ZTEST
using &VBDPA-MATNR&
using &VBDPA-WERKS&
changing &Field1&
changing &Field2&
changing &Field3&
changing &Field4&
changing &Field5&
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.