cancel
Showing results for 
Search instead for 
Did you mean: 

Contract mapping error

Former Member
0 Kudos

Hi ,

We are on SRM 4.0 and R/3 4.6C. I am setting up GoA transfer to R/3 and getting error in BLAORD "No batch input data for screen SAPMM06E 0514", as I believe this is because of missing company code in the IDoc and also I would need to map tax code. However, can someone please suggest if should use MODIFY_IDOC_DATA_CTR in BBP_CTR BAdI or something else. I appreciate if someone can post sample code for this method. We have already implement MODIFY_DATA_CTR.

Thanks in advance, points will definitely be rewarded for any helpful clue.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here you go, the exact code that is required to solve this problem.


METHOD if_ex_bbp_ctr~modify_idoc_data_ctr.

* Declaration for Local Constants
  CONSTANTS: lc_e1edp01(7) TYPE c VALUE 'E1EDP01',
             lc_e1edk14(7) TYPE c VALUE 'E1EDK14',
             lc_orgid(3)   TYPE c VALUE '011'.

* Declaration for Local Work Areas
  DATA: ls_t001k   TYPE t001k,
        ls_edidd   TYPE edidd,
        ls_e1edp01 TYPE e1edp01,
        ls_items   TYPE bbps_ctr_mm_item.

* Declaration for Local Variables
  DATA: lv_bukrs   TYPE bukrs.
  DATA: lv_index   TYPE i.

* Declaration for Field Symbols
  FIELD-SYMBOLS: <fs_edidd>   TYPE edidd.
  FIELD-SYMBOLS: <fs_e1edp01> TYPE e1edp01.

* Initialize the Local VAriables
  CLEAR: ls_t001k, ls_edidd, ls_e1edp01, lv_bukrs.

* Read the required IDoc entry
  READ TABLE ct_blaord INTO ls_edidd
       WITH KEY segnam = lc_e1edp01.

  IF sy-subrc EQ 0.
* Extract the SDATA
    ls_e1edp01 = ls_edidd-sdata.

* Select the appropiate Company Code
    SELECT SINGLE bukrs FROM t001k
           INTO lv_bukrs
                WHERE bwkey = ls_e1edp01-werks.

    IF NOT lv_bukrs IS INITIAL.
* Finally update the Company Code selected in the IDoc
      LOOP AT  ct_blaord ASSIGNING <fs_edidd>
                         WHERE segnam = lc_e1edk14.
        IF <fs_edidd>-sdata(3) = lc_orgid.
          <fs_edidd>-sdata+3(4) = lv_bukrs.
        ENDIF.
      ENDLOOP.         "LOOP AT  ct_blaord

    ENDIF.             "IF NOT lv_bukrs

  ENDIF.               "IF sy-subrc EQ 0.

ENDMETHOD.

Regards

Kathirvel

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks man..