‎2014 Jun 18 12:14 PM
Hi
I am trying to get the material document number added to an existing report and I have used the followingcode:
* Get the material document number
Clear Z_MAT_DOC_NO.
Select VBELN FROM VBFA
WHERE VBELV = LIKP-VBELN
AND VBTYP_N = 'R'.
However I get the error "Field list without INTO clause is not allowed. not allowed. allowed."
Can you tell me what I need to change on my code
thanks
Joe
‎2014 Jun 18 12:21 PM
Hi Joe.
Try this :
DATA : LW_VBFA TYPE VBFA. " Workarea
Select single * from VBFA into corresponding fields of LW_VBFA where VBLV= LIKP-VBELN AND VBTYP_N = 'R'.
Now in LW_VBFA you will get the records statisfying your condition.
Thanks
KH
‎2014 Jun 18 12:24 PM
Hi Joe,
Please try to use
Data: w_vbeln type vbfa-vbeln.
Clear Z_MAT_DOC_NO.
Select VBELN FROM VBFA
into w_vbeln
WHERE VBELV = LIKP-VBELN
AND VBTYP_N = 'R'.
Regards,
Prasenjit
‎2014 Jun 18 12:32 PM
Joe,
add SINGLE and INTO
CLEAR Z_MAT_DOC_NO.
SELECT SINGLE
VBELN
FROM VBFA
INTO Z_MAT_DOC_NO
WHERE VBELV = LIKP-VBELN
AND VBTYP_N = 'R'.
‎2014 Jun 18 1:41 PM
Thanks all
I have tried the following:
* Get the material document number
Clear Z_MAT_DOC_NO.
Select single VBELN
FROM VBFA
INTO Z_MAT_DOC_NO
WHERE VBELV = LIKP-VBELN
AND VBTYP_N = 'R'.
But no data is returned, I have checked the VBFA table and there is entry where VBELV matches LIKP-VBELN
‎2014 Jun 18 1:47 PM
Hi ,
Please check LIKP-VBELN and VBTYP_N = 'R' in VBFA table.
It might be any good movement will not be available for this delivery.
Regards,
Prasenjit
‎2014 Jun 18 2:27 PM
Hi
I have checked and LIKP-VBELN and VBTYP_N = 'R' in VBFA table. is in table VBFA.
Do you think this has anything to do with my table join which does not have VBFA:
VIQMEL links to VBAK-VBAP-VBRP-VBRK-LIKP
if I have to add in VBFA where should this be added in the table join?
thanks
Joe
‎2014 Jun 18 3:11 PM
I have now removed the LIKP join as i do not think this is correct join, but now I get the error message "LIKP-VBELN is uknown it is not in of the specified tables or defined by a data statement.
How would I define this in the data statement of the query, what would the data section of the query need to contain?
‎2014 Jun 18 3:23 PM
Hi Joe ;
CLEAR : Z_MAT_DOC_NO.
SELECT SINGLE MATNR FROM VBFA
INTO Z_MAT_DOC_NO
WHERE VBELV = LIKP-VBELN AND
VBTYP_N = 'R' .
Regards
Ă–zgĂĽn
‎2014 Jun 18 3:42 PM
Hello Joe ,
Try this ,
DATA : Z_MAT_DOC_NO TYPE VBFA-VBELN .
CLEAR :Z_MAT_DOC_NO.
SELECT SINGLE VBELN
FROM VBFA
INTO Z_MAT_DOC_NO
WHERE VBELV = LIKP-VBELN
AND VBTYP_N = 'R' .
~
Zuby Chakravorty
‎2014 Jun 18 4:01 PM
Hi Joe,
try this and see.
Clear Z_MAT_DOC_NO.
Select VBELN FROM VBFA into table itab
WHERE VBELV = LIKP-VBELN
AND VBTYP_N IN ( 'R' ).
Regards,
Venkat.