ā2014 Nov 18 8:53 AM
Hello,
I would like to insert quntity data in the document for the CO-PA field ABSMG in the CE1**** table.
In the code i relate it to fieldname 'ARTNR' (i think this might be the problem).
When i use only the criteria table, it works fine, but when i add the valuefield table i recieve an error that 'ARTNR' is not known.
When we do it manualy (not by code) it works OK
DATA: ls_criteria LIKE LINE OF ct_criteria,
ls_valuefield LIKE LINE OF ct_valuefield.
ls_criteria-itemno_acc = i_tabix.
ls_criteria-fieldname = 'ARTNR'.
ls_criteria-character = is_bapi_line-kupa.
APPEND ls_criteria TO ct_criteria.
ls_criteria-itemno_acc = i_tabix.
ls_criteria-fieldname = 'WERKS'.
ls_criteria-character = is_bapi_line-comp_code.
APPEND ls_criteria TO ct_criteria.
ls_valuefield-itemno_acc = i_tabix.
ls_valuefield-fieldname = 'ARTNR'.
ls_valuefield-base_uom = 'EA'.
ls_valuefield-qua_valcom = is_bapi_line-quantity.
APPEND ls_valuefield TO ct_valuefield.
Any ideas?
Thanks,
Moshe
ā2014 Nov 18 9:53 AM
Hi Moshe,
Pls try giving the ref_field in the fieldname from CE1* table by referring the ref field in the currency/Quantity tab for ABSMG field.
Hope it helps.
Regards,
K.S
ā2014 Nov 18 9:53 AM
Hi Moshe,
Pls try giving the ref_field in the fieldname from CE1* table by referring the ref field in the currency/Quantity tab for ABSMG field.
Hope it helps.
Regards,
K.S
ā2014 Nov 18 12:19 PM
Thanks KS
the code is:
ls_valuefield-fieldname = 'ABSMG'.
ls_valuefield-base_uom = 'EA'.
ls_valuefield-qua_valcom = is_bapi_line-quantity.
APPEND ls_valuefield TO ct_valuefield.
Now i'm trying to update also the amount in field VV500 and i'm trying to code the same way:
ls_valuefield-itemno_acc = i_tabix.
ls_valuefield-fieldname = 'ABSMG'.
ls_valuefield-base_uom = 'EA'.
ls_valuefield-qua_valcom = is_bapi_line-quantity.
APPEND ls_valuefield TO ct_valuefield.
ls_valuefield-itemno_acc = i_tabix.
ls_valuefield-fieldname = 'VV500'.
ls_valuefield-curr_type = '00'.
ls_valuefield-currency = 'ILS'.
ls_valuefield-amt_valcom = is_bapi_line-amt_doccur.
APPEND ls_valuefield TO ct_valuefield.
But i get error of 2 value fields. Any ideas?
ā2014 Nov 18 12:40 PM
Hi,
When you use UOM as EA pls check whether it is maintained as EA for the language that you execute.
IN DE it will be ST and not EA.
Please share you Piece of code of your data declarations.
Regards,
K.S
ā2014 Nov 18 3:23 PM
Hi,
I think that the problem is no with UOM because if i append onl the ABSMG to valuefield it works OK.
However when i try to update the valuefield amount of CO-PA in VV500 i get error of 2 valuefields in 1 line is not possible.
the full code is:
DATA: ls_criteria LIKE LINE OF ct_criteria,
ls_valuefield LIKE LINE OF ct_valuefield.
ls_criteria-itemno_acc = i_tabix.
ls_criteria-fieldname = 'ARTNR'.
ls_criteria-character = is_bapi_line-kupa.
APPEND ls_criteria TO ct_criteria.
ls_criteria-itemno_acc = i_tabix.
ls_criteria-fieldname = 'WERKS'.
ls_criteria-character = is_bapi_line-comp_code.
APPEND ls_criteria TO ct_criteria.
ls_valuefield-itemno_acc = i_tabix.
ls_valuefield-fieldname = 'ABSMG'.
ls_valuefield-base_uom = 'EA'.
ls_valuefield-qua_valcom = is_bapi_line-quantity.
APPEND ls_valuefield TO ct_valuefield.
ls_valuefield-itemno_acc = i_tabix.
ls_valuefield-fieldname = 'VV500'.
ls_valuefield-curr_type = '00'.
ls_valuefield-currency = 'ILS'.
ls_valuefield-amt_valcom = is_bapi_line-amt_doccur.
APPEND ls_valuefield TO ct_valuefield.
ā2014 Nov 19 8:50 AM
Hi,
Pls clear ls_valuefield as the valuefield filled for ABSMG is not yet cleared and it will have say BASE_UOM as 'EA'.
Try Clearing ls_valuefield and check whether you get it resolved.
Regards,
K.S
ā2014 Nov 19 2:57 PM
ā2014 Nov 25 8:11 AM