Skip to Content
author's profile photo Former Member
Former Member

ALE / Inbound processin / function modules

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 04:12 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 05:56 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.