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

reading screen field

Former Member
0 Likes
624

hI Experts,

I hav few input fields in my classical report. my sytex is not reading the variables. variable is of String type.

*READ LINE LINE_NUM FIELD VALUE ITAB-MATNR ITAB-MAKTX ITAB-MEINS APC01 APC02 APC03 APC04 APC05 APC06 APC07 APC08 APC09 APC10 APC11

APC12 APC13 APC14 APC15 APC16 APC17 APC18 APC19 APC20 APC21 APC22 APC23 APC24 APC25 APC26 APC27 APC28 APC29 APC30 APC31 APJ01 APJ02.*

Plz help. urgent.

Khan

hI Experts,

I hav few input fields in my classical report. my sytex is not reading the variables. variable is of String type.

*READ LINE LINE_NUM FIELD VALUE ITAB-MATNR ITAB-MAKTX ITAB-MEINS APC01 APC02 APC03 APC04 APC05 APC06 APC07 APC08 APC09 APC10 APC11

APC12 APC13 APC14 APC15 APC16 APC17 APC18 APC19 APC20 APC21 APC22 APC23 APC24 APC25 APC26 APC27 APC28 APC29 APC30 APC31 APJ01 APJ02.*

Plz help. urgent.

Khan

4 REPLIES 4
Read only

Former Member
0 Likes
603

Hi Khan,

Sorry I am not able to understand your query,

could u please elaborate a bit.

Regards,

Vaibhav.

Read only

Former Member
0 Likes
603

Hi,

Considering a module pool program, assuming you want to use the screen field in your program,

in the TOP include declare a global variable gv_var to which assign the screen field.

gv_var = screen_field.

Note: if you are using a database table, please do include a Tables: database_table_name in the TOP include.

gv_var must be of the type c and of specified length.

You can use gv_var in your program like any other global variable.

Reward if helpful.

Read only

Former Member
0 Likes
603

PRBLEM ALLREADY SOLVED...THANKS TO ALL.

Read only

Former Member
0 Likes
603

I dont think you should mention field name while reading line contents.

But you must use HIDE statement in base list.

.


" for example in base list
WRITE : ITAB-MATNR, ITAB-MAKTX, ITAB-MEINS, APC05, APC06, APC07.
HIDE :  ITAB-MATNR, ITAB-MAKTX, ITAB-MEINS, APC05, APC06, APC07. 
"then use READ LINE statement in AT LINE-SELECTION event.
READ LINE sy-lilli.
IF sy-subrc EQ 0.
WRITE :/ ITAB-MATNR, ITAB-MAKTX, ITAB-MEINS, APC05, APC06, APC07. 
ENDIF.