cancel
Showing results for 
Search instead for 
Did you mean: 

Assign a select result to a structure in SapScript

Former Member
0 Kudos

Hi all,

I want to assign a select result to a structure, vbdpr.

To the one field of the structure, to the field: herkl.

But I do not know how to do it at program side.

If I could do it, I just would write &vbdpr-herkl& at the sapscript side and display the value.

How can I do that.

Thanks.

Title was edited by:

Alvaro Tejada Galindo

Accepted Solutions (0)

Answers (5)

Answers (5)

Pawan_Kesari
Active Contributor
0 Kudos

=>Are u selectin data from somewhere and want to assign in field VBDPR-HERKL?

=>write

SINGLE field INTO vbdpr-herkl FROM table_name WHERE some_field = some_value

=>you can simply write VBDPR-HERKL = some_value in program ...

=> (fyi) VBDPR must be defined in your program using TABLES statement..

where do you want to do this in program or in sapscript?

Former Member
0 Kudos

Any other answer please.

I can not still see the herkl field.

Former Member
0 Kudos

u want herkl field ok

goto se84

abap dictionary

table field

ok execute then u get

Former Member
0 Kudos

hi deniz

IN PROG

DATA : BEGIN OF i_inv OCCURS 0 ,

vbeln LIKE vbrk-vbeln,

fkdat LIKE vbrk-fkdat,

kunag LIKE vbrk-kunag,

arktx LIKE vbrp-arktx,

matnr LIKE vbrp-matnr,

fkimg LIKE vbrp-fkimg,

netwr LIKE vbrp-netwr,

name1 LIKE kna1-name1,

adrnr LIKE kna1-adrnr,

END OF i_inv.

this is write in script

&i_inv-matnr& &i_inv-arktx&

like that ur write

Former Member
0 Kudos

if you are in an invoice, then &vbdpr-herkl& should work.

abdulazeez12
Active Contributor
0 Kudos

declare gx_struct as a structure with the field HERKL.

Select HERKL from VBDPR into gx_struct.