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

CBIH_IA30_IAL_CREATE

Dear experts,

I am using the function module 'CBIH_IA30_IAL_CREATE' to create an incident report; I tried passing most possible values to create the report but the log is not getting created. Can anyone provide me an insight of how to make this happen?

Thanks,

Kanthimathi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2008 at 03:33 AM

    Hi, the function module works! I have made a mistake.

    Thanks,

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I've got the some problem. How do you solve this issue? Actually I got an error message completely like "Internal program error (SAPLCBIH_IA04 SAPLCBIH_IA00 CBIH_IA30_IAL_CREATE 3).

      Thanks for your helping in advance.

  • author's profile photo Former Member
    Former Member
    Posted on May 21, 2008 at 02:41 AM

    Dear Friends,

    I am constantly getting queries related to this func. module and hence thought of posting my solution here.

    Here it goes...

    TYPE-POOLS : CIHAL.

    DATA: L_CREAPI_IAL_TAB TYPE CIHAL_IAL_API_TAB_TYPE

    WITH HEADER LINE,

    involved_pers type cihal_invpersa_api_tab_type with header line,

    INJURIES TYPE cihal_ipevinjapi_tab_type WITH HEADER LINE.

    DATA : PERSONAL_DATA TYPE TABLE OF BAPIP0002B WITH HEADER LINE,

    v_ia_log_entry LIKE cciht_ial-ialid.

    CALL FUNCTION 'BAPI_EMPLOYEE_GETDATA'

    EXPORTING

    LASTNAME_M = LAST_NAME

    FSTNAME_M = FIRST_NAME

    TABLES

    PERSONAL_DATA = PERSONAL_DATA .

    READ TABLE PERSONAL_DATA INDEX 1.

    CALL FUNCTION 'Z_FORMAT_DATE'

    EXPORTING

    I_DATE = l_date

    IMPORTING

    E_DATE = l_date

    .

    write l_date to L_CREAPI_IAL_TAB-HEAD-EVDAT.

    L_CREAPI_IAL_TAB-HEAD-LINEMOD = 'I'.

    L_CREAPI_IAL_TAB-HEAD-IATYPE = 'OPE'.

    L_CREAPI_IAL_TAB-HEAD-IAPLANT = '1300'.

    L_CREAPI_IAL_TAB-HEAD-LOGLOCKMOD = 'X'.

    L_CREAPI_IAL_TAB-HEAD-EVDESC = 'ACCIDENT'.

    L_CREAPI_IAL_TAB-HEAD-TPLNR = '?0100000000000003162'.

    L_CREAPI_IAL_TAB-HEAD-EQUNR = 'F-500-N001'.

    L_CREAPI_IAL_TAB-HEAD-MTNLANGU = 'EN'.

    *L_CREAPI_IAL_TAB-HEAD-EVDAT = EVENT_DATE.

    L_CREAPI_IAL_TAB-HEAD-EVTIME = SY-UZEIT.

    L_CREAPI_IAL_TAB-HEAD-ACLOC = 'STAIRS'.

    L_CREAPI_IAL_TAB-HEAD-ACLOCDESC = 'ACCIDENT DESC'.

    L_CREAPI_IAL_TAB-HEAD-EVTIMEZONE = 'CST'.

    L_CREAPI_IAL_TAB-HEAD-IAREPHDFLG = 'X'.

    L_CREAPI_IAL_TAB-HEAD-IASTATUS = 'I0439'.

    L_CREAPI_IAL_TAB-HEAD-valfr = '00010101'.

    L_CREAPI_IAL_TAB-HEAD-VALTO = '99991231'.

    L_CREAPI_IAL_TAB-HEAD-CRDAT = sy-datum.

    L_CREAPI_IAL_TAB-HEAD-CRNAM = sy-uname.

    L_CREAPI_IAL_TAB-HEAD-updDAT = sy-datum.

    L_CREAPI_IAL_TAB-HEAD-updNAM = sy-uname.

    L_CREAPI_IAL_TAB-HEAD-prodlflg = 'X'.

    L_CREAPI_IAL_TAB-HEAD-RECNTWAH = '59197'.

    involved_pers-HEAD-LINEMOD = 'I'.

    involved_pers-HEAD-IPTYPE = 'INJ'.

    involved_pers-HEAD-IPPERS = PERSONAL_DATA-PERNO.

    involved_pers-HEAD-IPPERSGRP = 'A'.

    involved_pers-AFFPERSDAT-HEAD-LINEMOD = 'I'.

    involved_pers-AFFPERSDAT-HEAD-IALPCAT = 'WKT'.

    involved_pers-AFFPERSDAT-INJURIES_TAB = INJURIES[].

    append involved_pers.

    INJURIES-LINEMOD = 'I'.

    INJURIES-BODYPART = 'CUST-IHBP02'.

    INJURIES-INJURY = 'CUST-IHINJ11'.

    APPEND INJURIES.

    L_CREAPI_IAL_TAB-invpersons_tab = involved_pers[].

    APPEND L_CREAPI_IAL_TAB.

    DATA :I_ADDINF LIKE RCGADDINF,

    E_FLG_WARNING TYPE ESP1_BOOLEAN,

    E_FLG_ERROR TYPE ESP1_BOOLEAN,

    E_ERROR_STRUC LIKE RCGEXTERROR,

    L_FLG_LOCKFAIL TYPE ESP1_BOOLEAN VALUE space.

    I_ADDINF-VALDAt = SY-DATUM.

    *

    CALL FUNCTION 'CBIH_IA30_IAL_CREATE'

    EXPORTING

    I_ADDINF = I_ADDINF

    I_FLG_HEADER = 'X'

    I_FLG_INVPERS = 'X'

    I_FLG_INVPERS_LTXT = 'X'

    I_FLG_AFFPERS = 'X'

    I_FLG_AFF_INTLTXT = 'X'

    I_FLG_INJURIES = 'X'

    IMPORTING

    E_FLG_LOCKFAIL = L_FLG_LOCKFAIL

    E_FLG_ERROR = E_FLG_ERROR

    E_FLG_WARNING = E_FLG_WARNING

    TABLES

    X_API_IAL_TAB = L_CREAPI_IAL_TAB

    EXCEPTIONS

    NO_OBJECT_SPECIFIED = 1

    PARAMETER_ERROR = 2

    INTERNAL_ERROR = 3

    CONVMODE_SET_FAILED = 4

    OTHERS = 5.

    if sy-subrc eq 0.

    CALL FUNCTION 'CBIH_IA30_IAL_SAVE_TO_DB'

    .

    IF SY-SUBRC = 0.

    read table L_CREAPI_IAL_TAB index 1.

    select single IALID into v_ia_log_entry

    from CCIHT_IAL

    where ialid = L_CREAPI_IAL_TAB-head-ialid.

    CONCATENATE

    'First Report Log Entry number' v_ia_log_entry

    'is created.' INTO message SEPARATED BY space .

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    endif.

    Regards,

    Kanthimathi

    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.