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

FM to read buffer data

former_member462254
Participant
0 Likes
2,819

my requirement is to read a data of a screen field.

Clear command has been used on a work area like 'clear: wa'. and just next to this line i wanna read the data of wa-field1.

=> solution

1. can declare a temp variable like wa-field1 and assign the wa-field1 data to this temp

=> expoert / import

=> parameter id---can't use hence wa-field1 is a z field

kindly suggest for the same...looking for a FM to read buffer data

Regards,

Anoop

3 REPLIES 3
Read only

Former Member
0 Likes
1,416

if it is screen field data then go for assign field symbol

eg:lc_constansts type c--- (prgname)filedname

  

exampl;lv_filds type c30(sapmv45a)vbap-vbeln.

fieldsymbols:<lfs_vbeln> type vbeln.

to store the value so define like this

        lw_field type vbeln.

assign  (lv_filds) to <lfs_vbeln>

if sy-subrc is initial.

lw_field = <lfs_vbeln>.

endif.

for clear example:

constants:lc_xvbrp     TYPE char20 VALUE '(SAPMV60A)XVBRP'

,

FIELD-SYMBOLS : <lfs_var>  TYPE any ,

.

ASSIGN (lc_xvbrp) TO <lfs_var1>.

IF <lfs_var1> is ASSIGNED. "in case of normal call

  lw_xvbrp = <lfs_var1>.

  UNASSIGN <lfs_var1>.

endif.

Read only

TanmayVerma
Active Participant
0 Likes
1,416

Hi Anoop,

You can use FM DYNP_VALUES_READ to read the screen values in buffer.

Regards,

Tanmay.

Read only

Former Member
0 Likes
1,416

Hi Anoop,

Since you already cleared that wa, where is buffer data come from.

So any concern if you declare a temp variable to store wa-field1? i prefer to use this.

regards

Archer