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

Not able to display table values in sap scripts

Former Member
0 Likes
1,470

Hello All,

I have a local table having my data which I want to print on the SAP Script. I write the following code in the window:

&lt_mara-matnr&, &lt_mara-mstae&,&lt_mara-ersda&. But instead of printing the values it is displaying the text as it is.

Help needed and response awaited.

Thanks,

Anju

Hello All,

I have a local table having my data which I want to print on the SAP Script. I write the following code in the window:

&lt_mara-matnr&, &lt_mara-mstae&,&lt_mara-ersda&. But instead of printing the values it is displaying the text as it is.

Help needed and response awaited.

Thanks,

Anju

9 REPLIES 9
Read only

former_member222860
Active Contributor
0 Likes
1,392

Did you populated the data into your itab in the driver program.

Read only

0 Likes
1,392

The data is present in the local table

Read only

Former Member
0 Likes
1,392

Hi,

Check u have used work area in your program.

Also look for element you mentioned in your write_ form with window

and write your code in that element in your script text.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ELEM1'

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN'

Regards,

Arun.

Read only

sravya_ch
Participant
0 Likes
1,392

Hi Anju Dhankhar

when we declear this in the script we need to use (/:)in the front i hope if u go there u can see.This will be one of the reasons.

as well after trying this also if u dont get na then put the degugging and check i hope u will get not tell what is the problem

Sravya

Read only

Former Member
0 Likes
1,392

Hi Anju,

Make sure that you are writing the code in the code section.

I mean, when you open the text element in the Script, at the left hand side you will see

/* Comment Line

/:Command Line

/E Text Element

Make sure that you are using the correct one.

Regards,

Kittu

Read only

0 Likes
1,392

actually that is the main problem I do not see the left column. I see just a wordpad like screen. I have written my code there.

I am in Graphical PC Editor mode.

Read only

Former Member
0 Likes
1,392

Hi Anju,

First u create a paragraph format and then u assign a paragrapg format to the left-hand side.And also mention a element name in the editor page.Use the functional module 1)OPEN_FORM

2)WRITE_FORM.

3)CLOSE_FORM.

Please try this.

Regards,

K.Karthikeyan.

Read only

Former Member
0 Likes
1,392

done

Read only

Former Member
0 Likes
1,392

Hi,

This is very general type problem...infact I guess most of the people doing SAP Script first time. Please ensure the following things:

1.Data must be populated in the internal table before calling the Write_Form

2.Wrtie form should be call within the LOOP-ENDLOOP on the internal table.

3.In the write form pass the lement name,type and window type in quotes and in cAPS

4.In script before printinf the value

/E ,name of the element passed in driver program>

/: &lt_mara-matnr&, &lt_mara-mstae&,&lt_mara-ersda&.

5.Change the editior GOTO->change editor will take you editor where you can write your codes.

Hope above steps will solve your problem.

Pooja