0% found this document useful (0 votes)
41 views3 pages

Break Liyu1.: Method

This document contains an ABAP method that populates pricing condition data for a duty framework. It loops through item pricing condition data, extracts the conditions needed, and appends them to a internal table. It then adds some test data to the table before assigning it to the item condition list for a document header reference.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

Break Liyu1.: Method

This document contains an ABAP method that populates pricing condition data for a duty framework. It loops through item pricing condition data, extracts the conditions needed, and appends them to a internal table. It then adds some test data to the table before assigning it to the item condition list for a document header reference.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

method /SAPSLL/IF_EX_IFEX_SD0C_R3~IF_EXTEND_CUS_CDOC.

*BREAK LIYU1.
BREAk deboeverg.




IF sy-uname = 'BLALLEMAND'.

DATA:
lwa_hdr_ref TYPE /sapsll/api6800_hdr_ref_r3_s,
lwa_komv TYPE komv,
lwa_cvl type /SAPSLL/API6800_ITM_CVL_R3_S,
lt_cvl type standard table of /SAPSLL/API6800_ITM_CVL_R3_S,
r_kschl TYPE RANGE OF komv-kschl,
wa_kschl LIKE LINE OF r_kschl.



**** populate range table with pricing conditions needed for duty framework
wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'ZIDL'.
append wa_kschl to r_kschl.

wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'ZIFF'.
append wa_kschl to r_kschl.

wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'ZIPC'.
append wa_kschl to r_kschl.

wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'ZIFM'.
append wa_kschl to r_kschl.


wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'zcif'.
append wa_kschl to r_kschl.

wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'ziaf'.
append wa_kschl to r_kschl.

wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'zimi'.
append wa_kschl to r_kschl.

wa_kschl-sign = 'I'.
wa_kschl-option = 'EQ'.
wa_kschl-low = 'sktv'.
append wa_kschl to r_kschl.



LOOP AT it_komv INTO lwa_komv.


IF lwa_komv-kschl IN r_kschl.

lwa_cvl-item_number = lwa_komv-kposn.
lwa_cvl-qual_val = lwa_komv-kschl.
lwa_cvl-value = lwa_komv-kbetr.
lwa_cvl-value_float = lwa_komv-kbetr.


lwa_cvl-val_curr = cs_hdr_cdoc-gen-company_code_curcy.
lwa_cvl-val_curr_iso = cs_hdr_cdoc-gen-company_code_curcy.

APPEND lwa_cvl TO lt_cvl.
CLEAR: lwa_cvl.

ENDIF.


ENDLOOP.


***** TEST DATA *****

lwa_cvl-item_number = '0000000010'.
lwa_cvl-qual_val = 'ZCIF'.
lwa_cvl-value = '0'.
lwa_cvl-value_float = '0'.


lwa_cvl-val_curr = 'EUR'.
lwa_cvl-val_curr_iso = 'EUR'.

APPEND lwa_cvl TO lt_cvl.

lwa_cvl-item_number = '0000000010'.
lwa_cvl-qual_val = 'TEST'.
lwa_cvl-value = '15'.
lwa_cvl-value_float = '15'.


lwa_cvl-val_curr = 'EUR'.
lwa_cvl-val_curr_iso = 'EUR'.

APPEND lwa_cvl TO lt_cvl.





**********************



cs_itm_cdoc-cvl[] = lt_cvl[].


FREE: lwa_hdr_ref, lwa_komv.







ENDIF.





endmethod.

You might also like