‎2006 Jun 11 10:55 AM
SELECT RSEGBELNR RSEGEBELN RSEGGJAHR RSEGLFBNR
RSEGLIFNR RSEGSHKZG RSEGWERKS RSEGWRBTR
RBKPBLART RBKPRMWWR RBKP~STBLG
RBKPVGART RBKPWAERS
INTO table itab_j
FROM ( RSEG
INNER JOIN RBKP
ON RBKPBELNR = RSEGBELNR
AND RBKPGJAHR = RSEGGJAHR )
WHERE RSEG~lfbnr = '10000040'.
why i dont get data into itab_j and in abapquery i get?
i declare itab_j same as the field in the select.
‎2006 Jun 11 11:40 AM
Hi Rani,
Use the following conversion exit on LFBNR before processing SELECT query.
<b>CONVERSION_EXIT_ALPHA_INPUT</b>.
If you specify same value at SELECTION-SCREEN through PARAMETERS/SELECT-OPTIONS with defintion RSEG-LFBNR then conversion exits will automatically trigger and the conversion exit values will be processed in SELECT query.
If you hardcode directly in SELECT statement, it wont perform any CONVERSION EXITs.So we need to handle it through CONVERSION EXITS.
<b>Note: Plz reward points to all helpful answers and close thread if is solved</b>
Thanks,
Vinay
‎2006 Jun 11 11:15 AM
Try with packing RSEG~lfbnr with '0010000040'
Use conversion FM to suffice the above requirement if it works.
Regds
Manohar
‎2006 Jun 11 11:40 AM
Hi Rani,
Use the following conversion exit on LFBNR before processing SELECT query.
<b>CONVERSION_EXIT_ALPHA_INPUT</b>.
If you specify same value at SELECTION-SCREEN through PARAMETERS/SELECT-OPTIONS with defintion RSEG-LFBNR then conversion exits will automatically trigger and the conversion exit values will be processed in SELECT query.
If you hardcode directly in SELECT statement, it wont perform any CONVERSION EXITs.So we need to handle it through CONVERSION EXITS.
<b>Note: Plz reward points to all helpful answers and close thread if is solved</b>
Thanks,
Vinay
‎2006 Jun 11 12:02 PM
data: begin of itab_j occurs 0,
belnr like RSEG-BELNR,
ebeln like RSEG-EBELN,
gjahr like RSEG-GJAHR,
lfbnr like RSEG-LFBNR,
lifnr like RSEG-LIFNR,
shkzg like RSEG-SHKZG,
werks like RSEG-WERKS,
wrbtr like RSEG-WRBTR,
blart like RBKP-BLART,
rmwwr like RBKP-RMWWR,
stblg like RBKP-STBLG,
vgart like RBKP-VGART,
waers like RBKP-WAERS,
end of itab_j.
loop at itab assigning <ls_itab>.
data: z_lblni like essr-lblni.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = <ls_itab>-lblni
IMPORTING
OUTPUT = z_lblni.
SELECT RSEGBELNR RSEGEBELN RSEGGJAHR RSEGLFBNR
RSEGLIFNR RSEGSHKZG RSEGWERKS RSEGWRBTR
RBKPBLART RBKPRMWWR RBKP~STBLG
RBKPVGART RBKPWAERS
INTO table itab_j
FROM ( RSEG
INNER JOIN RBKP
ON RBKPBELNR = RSEGBELNR
AND RBKPGJAHR = RSEGGJAHR )
WHERE RSEG~lfbnr = z_lblni.
i treis and it's not work????
‎2006 Jun 11 12:04 PM
‎2006 Jun 11 12:13 PM
Rani,
Is this select statement is in loop?
or does this field z_lblni is only a variable for your select?
Regds
Mnaohar
‎2006 Jun 11 12:19 PM
‎2006 Jun 11 12:23 PM
Try using this type of select if the select is in loop.
SELECT ... INTO|<b>APPENDING</b> [CORRESPONDING FIELDS OF] TABLE <itab>Regds
Manohar