cancel
Showing results for 
Search instead for 
Did you mean: 

ALE / Inbound processin / function modules

Former Member
0 Kudos

Hello

I am quite new in ABAB and i have a ALE question:

For testing the minisap WA1 I designed a very simple Idoc

with one INT and one CHAR segment.

I wrote a JcO programm, that sends that Idoc to my WA1 system.

For inpound-processing the Idoc, I designed a processing code, linked with my Idoc (and the Partnerprofile, Processing Code, etc,).

But: The last step, the FunctionModule doesn't work. It shoud write the Idoc-data in the tables, I created for my tests

//* Did someone designe a simple Idoc for testing purpose and the corresponding function module?

//* Is it always necessary to design a Business Object for inbound processing?

following my function module:

FUNCTION YGBG_F_02.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(INPUT_METHOD) TYPE  BDWFAP_PAR-INPUTMETHD
*"     REFERENCE(MASS_PROCESSING) TYPE  BDWFAP_PAR-MASS_PROC
*"  EXPORTING
*"     REFERENCE(WORKFLOW_RESULT) TYPE  BDWFAP_PAR-RESULT
*"     REFERENCE(APPLICATION_VARIABLE) TYPE  BDWFAP_PAR-APPL_VAR
*"     REFERENCE(IN_UPDATE_TASK) TYPE  BDWFAP_PAR-UPDATETASK
*"     REFERENCE(CALL_TRANSACTION_DONE) TYPE  BDWFAP_PAR-CALLTRANS
*"  TABLES
*"      IDOC_CONTRL STRUCTURE  EDIDC
*"      IDOC_DATA STRUCTURE  EDIDD
*"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
*"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
*"      SERIALIZATION_INFO STRUCTURE  BDI_SER
*"  EXCEPTIONS
*"      WRONG_FUNCTION_CALLE
*"----------------------------------------------------------------------

  CONSTANTS:
    c_mandt TYPE SY-MANDT VALUE  '000',
    c_mestyp TYPE edidc-mestyp VALUE 'ZIDOC',
    c_idoctp TYPE edidc-idoctp VALUE 'ZIDOC01',
    c_subobject TYPE balhdr-subobject VALUE 'Z_TEST'.

  TYPES:
    BEGIN OF dbt_line,
      MANDT TYPE MANDT,
      col_1 TYPE I,
      col_2(10) TYPE C,
    END OF dbt_line.

  DATA:
    f_col_1     TYPE   z_col_1,
    f_col_2     TYPE   z_col_2,
    f_edidc     TYPE   edidc,
    f_edidd     TYPE   edidd,
    f_col_tab   TYPE   dbt_line,
    f_zgbgseg01 TYPE   zgbgseg01.

  READ TABLE idoc_contrl INDEX 2.

  LOOP AT idoc_contrl INTO f_edidc.
    EXIT.
  ENDLOOP.

  LOOP AT idoc_data INTO f_edidd.
    CASE f_edidd-segnam.
      WHEN 'ZGBGSEG01'.
        CLEAR f_zgbgseg01.
        f_zgbgseg01 = f_edidd-sdata.
        f_col_tab-MANDT = SY-MANDT.
        f_col_tab-COL_1 = f_zgbgseg01-col_1.
        f_col_tab-COL_2 = f_zgbgseg01-col_2.
        INSERT INTO ZTAB01 VALUES f_col_tab.
    ENDCASE.

  ENDLOOP.

ENDFUNCTION.

Accepted Solutions (1)

Accepted Solutions (1)

martin_vierling
Advisor
Advisor
0 Kudos

Hi,

maybe the examples on SAP interface documentation for CA-ALE may help you:

https://www.sdn.sap.com/sdn/services.sdn?page=ale_converters.htm

Regards

Martin

Former Member
0 Kudos

Hi!!

You can see what happens with your idoc in the we05 transaction, and you can change and reprocesed it in we19.

regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try WE19 to test your IDOC in SAP system first to see if the records are being updated. Check table contents or the value of SY-SUBRC after your INSERT statement. If that is fine, then you might be missing a step in ALE configuration. Take a look at http://www.sapgenie.com/sapgenie/docs/ale_whitepaper.doc for a detailed description of the ALE process. You can directly jump to Chapter 5 (ALE Development) for a step-by-step guide for IDoc processing.

Regards