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

Question on Sapscipt and Structures

Former Member
0 Likes
836

Dear All,

I am not very familiar wtih sapscripts. When I look into the codes for the script, I find that the sapscript is able to access data from structures like VBDKR etc using

&VBDKR-VBTYP&.

Where in the sapscript do I specify which stuctures to read from and how are the data populated into the structures?

Best Regards,

Junwen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
757

Hi,

If something ( structure ) is defined in the global parameters of the printing program, it can be used in sapscript.

Svetlin

Dear All,

I am not very familiar wtih sapscripts. When I look into the codes for the script, I find that the sapscript is able to access data from structures like VBDKR etc using

&VBDKR-VBTYP&.

Where in the sapscript do I specify which stuctures to read from and how are the data populated into the structures?

Best Regards,

Junwen

4 REPLIES 4
Read only

Former Member
0 Likes
757

Hi,

First call open_form.

You need to loop at the internal table which has the contents.

Write_form.

endloop.

Then close_form

and End_form.

Cheers,

Sam

Read only

Former Member
0 Likes
758

Hi,

If something ( structure ) is defined in the global parameters of the printing program, it can be used in sapscript.

Svetlin

Read only

Former Member
0 Likes
757

All global data specified in the driver program that launch the SAPscript layout is accessible from it.

To print out the data from the driver program into the main window you need to call FM "WRITE_FORM" specifying the element from the main window to print out that will print the data that contains its variables in the driver program.

I hope this answer your question.

Aubin

Read only

Former Member
0 Likes
757

Read more about the following funciton modules in SE37

1. OPEN_FORM

2. WRITE_FORM

3. CLOSE_FORM

You should crack it.

Regards,

Deva.