‎2008 Jan 21 7:52 AM
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.
‎2008 Jan 21 7:59 AM
Can you provide details of dump and declaration of tvbak.
Regards
Eswar
‎2008 Jan 21 8:00 AM
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
‎2008 Jan 21 8:00 AM
may i know what is the structure that u created. and is the table referiing that structure
‎2008 Jan 21 8:08 AM
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
‎2008 Jan 21 10:47 AM
while creatin structure for them u need to to specify refeence fields for them
Reward point if helpful
egards
Shashi