2009 Jun 12 5:35 AM
Hi Friends..
I am using EXIDV and EXIDV2 field in function module.
I am using HU number as a import parameter, depends on user input some times its a EXIDV value and some times its a EXIDV2 value.
if HU number is a EXIDV value,no problem in function module, but I gave EXIDV2 value in function module its not come into coding part...instead of first i can't able to use second select ..find the below coding..
-
SELECT SINGLE vhilm FROM vekp into vhilm WHERE exidv = hu AND status NE '0060'.
*SELECT SINGLE vhilm FROM vekp into vhilm WHERE exidv = hu AND status NE '0060'.
IF sy-subrc NE 0.
status = '999'.
CONCATENATE hu 'HU does not exist in SAP' INTO
message SEPARATED BY space.
EXIT.
ELSE.
status = '000'.
CONCATENATE hu 'HU exist in SAP' INTO
message SEPARATED BY space.
ENDIF.
-
if anybody have idea about this kindly let me know..
Thanks
Gowrishankar
2009 Jun 12 5:39 AM
Hello
Change u r query by including the EXDIV2 field also in where condition,
SELECT SINGLE vhilm FROM vekp into vhilm WHERE status NE '0060'
and ( exidv = hu or exdiv2 = hu ).
Becasue sometimes it may be avaialble in Handling Unit's 2nd External Identification (EXDIV2) field.
Hope it will be helpful.
Regards,
2009 Jun 12 5:39 AM
Hello
Change u r query by including the EXDIV2 field also in where condition,
SELECT SINGLE vhilm FROM vekp into vhilm WHERE status NE '0060'
and ( exidv = hu or exdiv2 = hu ).
Becasue sometimes it may be avaialble in Handling Unit's 2nd External Identification (EXDIV2) field.
Hope it will be helpful.
Regards,
2009 Jun 12 5:40 AM
Did you check the table VEKP with EXIDV2 value what ever is coming to the function. Try Debugging and see what value you are passing to the function and check it in the table.
2009 Jun 12 5:41 AM
Hi,
change ur select to:
SELECT SINGLE vhilm FROM vekp into vhilm WHERE (exidv = hu or exdiv2 = hu) AND status NE '0060'.
Rgds,
Pavan
2009 Jun 12 5:53 AM
hi all
Thanks for your replies..
still the problem continues..if incoming value is EXIDV field its not a problem, if EXIDV2 values is passed
no values updated in the table after select statement.
so..again aconfusing..after debugging also it continues like that..
Thanks
Gowrishankar
2009 Jun 12 5:57 AM
Hello,
Please check the HU value is available in vkep under exdiv or exdiv2 ......
Regards
2009 Jun 12 6:08 AM
ya its availbale..I used different HU value..if I used value related with EXIDV it passed perfectly..if I used value related with EXIDV2, no values selected in select statement.
Thanks
Gowrishankar
2009 Jun 12 6:05 AM
Hi,
I think hu should be in quotes like 'hu'
Write like this
SELECT SINGLE vhilm FROM vekp into vhilm
WHERE (exidv = 'hu' or exdiv2 = 'hu') AND status NE '0060'.
Regards,
Kumar Bandanadham