Skip to Content
0
Former Member
Mar 16, 2010 at 05:59 PM

Beginner in ABAP

22 Views

Hello every one,

I am new to SAP ABAP. I created a program which is shown below. I am not able to identify a problem, pls advice me, any changes has to be done.

tables: vbak.

select-options: s_sdoc for vbak-vbeln.

types: begin of gty_vbak,

auart type auart,

vkorg type vkorg,

vtweg type vtweg,

spart type spart,

end of gty_vbak.

data: gt_vbak type standard table of gty_vbak initial size 0,

gs_vbak type gty_vbak.

select auart

vkorg

vtweg

spart

from vbak

into gt_vbak

where vbeln in p_sdoc.

write:/2 'Sales Doc ty', 18 'Sales Org', 33 'Dist Ch', 48 'Div'.

skip.

loop at gt_vbak into gs_vbak.

write:/2 gs_vbak-auart,

18 gs_vbak-vkorg,

33 gs_vbak-vtweg,

48 gs_vbak-spart.

endloop.