03-01-2011 11:43 AM
Hi,
I have made a RFC in source code from import parameters only two fields are pass vaue remaining all fileds are optional and the required import parameter VKORG and ERDATE i am passing properly but still the data is not coming in internal table
*********source code
SELECT AVBELN AERDAT AAUART AVKORG AVKBUR AKNUMV ABSTNK ABSTDK A~KUNNR
BPOSNR BMATNR BMATKL BARKTX BNETPR BKWMENG
CETENR CEDATU C~BMENG
D~GBSTA
into corresponding fields of table it_itab from
VBAK AS A INNER JOIN VBAP AS B ON AVBELN = BVBELN
INNER JOIN VBEP AS C ON AVBELN = CVBELN AND BPOSNR = CPOSNR
INNER JOIN VBUP AS D ON AVBELN = DVBELN AND BPOSNR = DPOSNR
where A~VKORG EQ VKORG
AND A~VKBUR EQ VKBUR
AND A~ERDAT IN it_range_ERDAT
AND A~KUNNR IN it_range_KUNNR
AND A~AUART EQ AUART
AND B~MATNR IN it_range_MATNR
AND C~EDATU IN it_range_EDATU
AND D~GBSTA NE 'C'.
I have check the entry in the data base table record is present there but still it is not coming what can be the problem
here i am passing VKORG and it_range_ERDAT remaining fileds are optional
************************
regards,
zafar
Edited by: zafar_karnalkar on Mar 1, 2011 12:44 PM
Edited by: zafar_karnalkar on Mar 1, 2011 12:44 PM
03-01-2011 11:55 AM
03-01-2011 12:03 PM
Hi,
I am not clear what you hvae suggest, i have checked the where condition in debugging the data which i am passing is coming porperly til select statement but in internal table the record is not coming.
regards,
zafar
03-01-2011 12:03 PM
Hi,
The Select query seems to be right.
You can use for all entries instead of Join Conditions.
Thanks
Arbind
03-01-2011 12:13 PM
Hi,
please show us the definition of your internal table. Field names must have identical names!
Regards,
Klaus
03-01-2011 12:18 PM
Hi,
By keeping the same code but when i have pass value for all the import parameters which are there in the where cluase the data is coming, but i have set some parameters as optional, but still it is not working when I pass some value in all filed then only data is coming.
I observe it required value for filed VKBUR and AUART, still both are optional.
regards,
zafar
Edited by: zafar_karnalkar on Mar 1, 2011 1:19 PM
03-01-2011 12:30 PM
If you check for EQ and have no values you check for space.
For all optional checks for EQ please use RANGES tables which you fill, when parameter value is given and check then for "IN" instead of "EQ" ...
Edited by: Klaus Babl on Mar 1, 2011 1:32 PM
03-01-2011 12:32 PM
Please make sure you are passing values for VKORG, VKBUR, AUART and GBSTA which matches the entry in the DB table. As otherwise for first 3 parameters it will try to search for record with its initial value. Since the other parameters are a range, it should not matter even if there are left empty.
Regards
Ranganath