‎2007 Nov 12 7:53 PM
Hello,
everything looks good but the select query is giving sy-subrc = 4.
DATA: begin of lt_zsfdet_new occurs 0,
invnmb like zsfdet_new-invnmb,
shipdt like zsfdet_new-shipdt,
end of lt_zsfdet_new.
select invnmb shipdt from zsfdet_new into table lt_zsfdet_new for all entries in gt_display where invnmb = gt_display-delno.
Please help
‎2007 Nov 12 7:57 PM
have you looked in Debugging ?
First see the data in gt_display internal table ,if data is availble then check in database table .
Thanks
Seshu
‎2007 Nov 12 7:56 PM
Check out the gt_display entries. It seems that you don't have mathching entries in the with the zsfdet_new -invmb and gt_display-delno.
Regards,
Naimesh Patel
‎2007 Nov 12 7:56 PM
Keep the break-point at select query and check gt_display-delno has values or not.
if no values found it will returns 4.
Reward points if it helps,
Satish
‎2007 Nov 12 7:57 PM
Hi,
Please check table zsfdet_new.
SY-SUBRC = 4 means no data was found in the database.
Regards,
Ferry Lianto
‎2007 Nov 12 7:57 PM
have you looked in Debugging ?
First see the data in gt_display internal table ,if data is availble then check in database table .
Thanks
Seshu
‎2007 Nov 12 8:02 PM
Thanks for the suggestions,
I have checked them in debug mode, gt_display has the entries which even exist in the zsfdet_new .
‎2007 Nov 12 8:06 PM
Take one or two records in debugging ( gt_display-delno),now goto SE16 -> check the entries in zsfdet_new ( Look at exact field).
May be wrong field name mentioned in where clause.
Thanks
Seshu
‎2007 Nov 12 8:08 PM
Hi,
keep all delno values of internal table lt_zsfdet_new into table zsfdet_new from SE11 and see whether u r getting any values or not.
if not problem then there is no data in ZSFDET_NEW with delno values.
reward if it helps,
Satish
‎2007 Nov 12 8:09 PM
Check the leading zeros for both the fields. If your GT_DISPLAY-INVNO doesnot have leading zeros and your ZSDFET_NEW-DELNO has leading zeros than you need to fill the leading zeros ...
You can use the conversio routine or do it with UNPACK.
LOOP AT GT_DISPLY.
UNPACK GT_DISPLY-INVNO to GT_DISPLAY-INVNO.
modify GT_DISAPLY.
endloop.
Than use this table into select query...
Regards,
Naimesh Patel
‎2007 Nov 12 8:10 PM
gt_display-delno may be missing leading zeroes that are present in the database. You should run these through the proper conversion exit before doing the SELECT.
Rob
‎2007 Nov 12 8:12 PM
Hi,
Perhaps you need to add leading zeros to field delno in internal table gt_display.
If you do, you can use FM CONVERSION_EXIT_ALPHA_INPUT to update with leading zeros prior to use in select statement.
Regards,
Ferry Lianto