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

Hi problems in function module

Former Member
0 Likes
567

Hi friends I have the following problems.........

When I am using this following code in a function module

its not giving me output until i comment those two fields kwmeng and netwr..i have use VRKME and WAERS for those two..........which are the components of a structure i have created....unless i comment them its giving dump

but when i am using the same thing in report...i am getting

values..off course there is no use of structures......i am creating internal tables and using them ...

i need to use this functio module...how can i get the data from those two fields..tell me the

SELECT vbak~vbeln

vbak~erdat

vbak~vkorg

vbak~ABRVW

vbak~augru

vbak~kunnr

vbap~posnr

vbap~matnr

vbap~vkaus

vbap~spart

  • vbap~netwr

vbap~waerk

  • vbap~kwmeng

vbap~kondm

vbap~mvgr1

vbap~mvgr2

vbap~mvgr3

vbap~mvgr4

vbap~mvgr5

FROM vbak AS vbak INNER JOIN vbap AS vbap

ON vbakvbeln EQ vbapvbeln

INTO corresponding fields of TABLE tvbak

WHERE vbak~vbeln = vbeln1.

5 REPLIES 5
Read only

Former Member
0 Likes
542

Can you provide details of dump and declaration of tvbak.

Regards

Eswar

Read only

Former Member
0 Likes
542

Hi jyotirmoy,

Check if tvbak has fieldnames same as field you are selecting. As you are using INTO CORRESPONDING FIELDS OF TABLE select query will assign values with same name in your internal table.

Regards,

Mohaiyuddin

Read only

Former Member
0 Likes
542

may i know what is the structure that u created. and is the table referiing that structure

Read only

Former Member
0 Likes
542

there is aproblem witht he last line of your code:

WHERE vbak~vbeln = vbeln1.

it should be

WHERE vbakvbeln = vbapvbeln.

There is no problem with selection of netwr or Kwmeng .

Edited by: Rachana Singh on Jan 21, 2008 9:09 AM

Read only

Former Member
0 Likes
542

while creatin structure for them u need to to specify refeence fields for them

Reward point if helpful

egards

Shashi