on 01-24-2014 4:31 PM
Hello Gurus,
I wanted Table or a Table join which can fetch me the Declaration# if I input the PO# or Delivery# in GTS
Currently, using CUHD and LEGREF, I am able to retrieve PO# and Delivery# from a declaration#
But, I want vice-versa
I want to input PO# and retrieve the corresponding Declaration#
Any help is highly appreciated
I tried using CUHD, CUIT, CORFLO, LEGREF
Regards,
VK
Hi Vineeet,
You need to use a table join - something like:
SELECT SINGLE corder coyear
INTO CORRESPONDING FIELDS OF es_cuhd_sk
FROM /sapsll/cuhd
JOIN /sapsll/corref ON guid_mobj = /sapsll/cuhd-guid_cuit
AND /sapsll/corref~mobjt = /sapsll/cuhd~mobjt
WHERE qalref = 'EXTIDF'
AND objtp = 'BUS2012'
AND orglogsys = iv_logsys
AND refno = iv_po_num.
You should first transform the P.O. number using Function Module CONVERSION_EXIT_ALPHA_INPUT, so that the field (type /SAPSLL/REFNO) is filled with leading zeros as stored in the table.
I've replied quite literally to your question, but in practice you might want to work at Item level, since a single P.O. could be linked to more than one Customs Document. And if you transfer P.O's and use Import Declarations, you might need further filtering (the QALREF value might change between 'EXTID' and 'EXTDIF' accordingly).
Hope that helps.
Regards,
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.