These are some codes to simulate Pricing Conditions upload using IDOC
*&------------------------------------------------------------------------ *& Form map_idoc_structure *&------------------------------------------------------------------------ * Map E1KOMG, E1KONH, E1KONP segment fields *------------------------------------------------------------------------- FORM map_idoc_structure USING fp_condition_table TYPE kotabnr
fp_rate TYPE z_cs_cpp_rate
fp_condition_type TYPE kschl
fp_rate_type TYPE z_cs_file_type.
*-- Local Data Declaration DATA: lw_e1komg TYPE e1komg, "Filter seg. with separated condition key
lw_e1konh TYPE e1konh, "Data from condition header
lw_e1konp TYPE e1konp, "Conditions Items
lv_delete TYPE konp-loevm_ko. " Delete Indicator
i_idoc_data-sdata = lw_e1konp. APPEND i_idoc_data TO i_idoc_data.
*-- Post Idoc for Creating Pricing Condition PERFORM post_idoc TABLES i_idoc_data.
ENDFORM. " map_idoc_structure
*&------------------------------------------------------------------------ *& Form post_idoc TABLES i_idoc_data. *&------------------------------------------------------------------------ * Post Idoc for Creating Pricing Condition *------------------------------------------------------------------------ FORM post_idoc TABLES i_idoc_data STRUCTURE edidd.
*-- Local data declaration DATA: lv_komg LIKE komg, " Condition Structures
lv_subrc LIKE sy-subrc, " Sy-subrc
lw_messages TYPE rsuvm_msg, " Message Description
lw_idoc_status TYPE bdidocstat. " ALE IDoc status
DATA: idoc_contrl " IDoc Control data LIKE edidc OCCURS1WITHHEADERLINE.
Social Plugin