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

Info Type 416 ( leave encashment)- BDC

Dear Friends,

I would need help on 416 ( leave encashment) , my user has around 5000 employees for leave encashment, we are thinking to develop BDC for IT 416 due to short of time , request your expert advice on same, can I BDC program for info type 416.

Regards,

Vamshi

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 Jan 12, 2009 at 01:03 PM

    Why not??

    I had developed a BDC for Infotype 2001 which takes from an excel sheet..heres d code..

    report ZHR_BDCP_INF2001

    no standard page heading line-size 255.

    **********************************************************************

    • Types Declarations

    **********************************************************************

    TYPES:BEGIN OF x_inf,

    pernr(8),

    from_date(10),

    to_date(10),

    END OF x_inf.

    TYPES: BEGIN OF x_outtab,

    exception(1),

    pernr(8),

    from_date(10),

    to_date(10),

    subtype(2),

    msgtyp(7) ,

    mstring(480),

    END OF x_outtab.

    **********************************************************************

    • Data Declarations

    **********************************************************************

    DATA: it_filename TYPE filetable,

    it_inf TYPE STANDARD TABLE OF x_inf,

    it_outtab TYPE STANDARD TABLE OF x_outtab,

    it_data TYPE STANDARD TABLE OF alsmex_tabline,

    bdcdata TYPE STANDARD TABLE OF bdcdata, "Batchinputdata of single transaction

    messtab TYPE STANDARD TABLE OF bdcmsgcoll. "Messages of call transaction.

    DATA: wa_filename LIKE LINE OF it_filename,

    v_filename TYPE localfile,

    v_filename1 TYPE string,

    wa_inf TYPE x_inf,

    wa_inf1 TYPE x_inf,

    wa_outtab TYPE x_outtab,

    wa_data TYPE alsmex_tabline,

    wa_data1 TYPE alsmex_tabline,

    wa_bdcdata TYPE bdcdata,

    wa_messtab TYPE bdcmsgcoll,

    l_mstring(480) TYPE c,

    v_rc TYPE i.

      • Objects **

      DATA: gr_outtab TYPE REF TO cl_salv_table,

      gr_functions TYPE REF TO cl_salv_functions_list,

      gr_columns TYPE REF TO cl_salv_columns_table,

      gr_column TYPE REF TO cl_salv_column_table,

      gr_content TYPE REF TO cl_salv_form_element.

      CONSTANTS: c_title TYPE string VALUE 'Select File with Time Event Data',

      c_x TYPE c VALUE 'X',

      c_asc(10) TYPE c VALUE 'ASC',

      c_sep(1) TYPE c VALUE '/',

      c_xls TYPE string VALUE 'XLS'.

      **********************************************************************

      • SELECTION-SCREEN

      **********************************************************************

      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-003.

      SELECTION-SCREEN SKIP.

      *File Name

      SELECTION-SCREEN BEGIN OF LINE.

      SELECTION-SCREEN COMMENT 5(28) text-001 FOR FIELD p_file.

      PARAMETERS: p_file TYPE file_table-filename OBLIGATORY.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN SKIP.

      *Number of rows

      SELECTION-SCREEN BEGIN OF LINE.

      SELECTION-SCREEN COMMENT 5(29) text-007 FOR FIELD p_rows.

      PARAMETERS: p_rows TYPE i OBLIGATORY.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN SKIP.

      SELECTION-SCREEN SKIP.

      SELECTION-SCREEN SKIP.

      SELECTION-SCREEN COMMENT 5(10) text-004.

      SELECTION-SCREEN SKIP.

      SELECTION-SCREEN COMMENT 5(79) text-005.

      SELECTION-SCREEN END OF BLOCK b1.

      ************************************************************************

      • A T S E L E C T I O N S C R E E N ON VALUE-REQUEST

      ************************************************************************

      AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

      *Select Upload file

      PERFORM get_filename.

      ************************************************************************

      • S T A R T O F S E L E C T I O N

      ************************************************************************

      START-OF-SELECTION.

      *Read Content of upload file

      PERFORM read_file.

      • Upload data

      PERFORM upload_data.

      ************************************************************************

      • E N D O F S E L E C T I O N

      ************************************************************************

      END-OF-SELECTION.

      • SALV Creation

      PERFORM fill_create_salv.

      ************************************************************************

      • F O R M S

      ************************************************************************

      &----


      *& Form get_filename

      &----


      • text

      ----


      • --> p1 text

      • <-- p2 text

      ----


      form get_filename .

      • Select File For Upload

      CALL METHOD cl_gui_frontend_services=>file_open_dialog

      EXPORTING

      window_title = c_title

      multiselection = abap_false

      CHANGING

      file_table = it_filename

      rc = v_rc

      EXCEPTIONS

      file_open_dialog_failed = 1

      cntl_error = 2

      error_no_gui = 3

      not_supported_by_gui = 4

      OTHERS = 5.

      IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

      ENDIF.

      CLEAR p_file.

      READ TABLE it_filename INTO wa_filename INDEX 1.

      p_file = wa_filename-filename.

      endform. " get_filename

      &----


      *& Form read_file

      &----


      • text

      ----


      • --> p1 text

      • <-- p2 text

      ----


      form read_file .

      IF p_file IS INITIAL.

      MESSAGE 'No File Name' TYPE 'E'.

      ENDIF.

      v_filename = p_file.

      *Reading from Excel File

      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

      EXPORTING

      filename = v_filename

      i_begin_col = 1

      i_begin_row = 2

      i_end_col = 3

      i_end_row = p_rows

      tables

      intern = it_data

      EXCEPTIONS

      INCONSISTENT_PARAMETERS = 1

      UPLOAD_OLE = 2

      OTHERS = 3

      .

      IF sy-subrc <> 0.

      MESSAGE 'Error in data' TYPE 'E'.

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

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

      ENDIF.

      *Moving from excel to the internal table format

      LOOP AT it_data INTO wa_data1.

      wa_data = wa_data1.

      AT NEW row.

      CLEAR wa_inf.

      ENDAT.

      CASE wa_data-col.

      WHEN '001'.

      MOVE wa_data-value TO wa_inf-pernr.

      WHEN '002'.

      MOVE wa_data-value TO wa_inf-from_date.

      WHEN '003'.

      MOVE wa_data-value TO wa_inf-to_date.

      ENDCASE.

      AT END OF row.

      APPEND wa_inf TO it_inf.

      ENDAT.

      CLEAR : wa_data.

      ENDLOOP.

      endform. " read_file

      &----


      *& Form upload_data

      &----


      • text

      ----


      • --> p1 text

      • <-- p2 text

      ----


      form upload_data .

      LOOP AT it_inf INTO wa_inf.

      perform bdc_dynpro using 'SAPMP50A' '1000'.

      perform bdc_field using 'BDC_OKCODE'

      '=INS'.

      perform bdc_field using 'RP50G-PERNR'

      wa_inf-pernr.

      perform bdc_field using 'BDC_CURSOR'

      'RP50G-ENDDA'.

      perform bdc_field using 'RP50G-TIMR6'

      'X'.

      perform bdc_field using 'RP50G-BEGDA'

      wa_inf-from_date.

      perform bdc_field using 'RP50G-ENDDA'

      wa_inf-to_date.

      perform bdc_field using 'RP50G-CHOIC'

      '2001'.

      perform bdc_field using 'RP50G-SUBTY'

      'L1'.

      perform bdc_dynpro using 'MP200000' '2000'.

      perform bdc_field using 'BDC_CURSOR'

      'P2001-BEGDA'.

      perform bdc_field using 'BDC_OKCODE'

      '=UPD'.

      perform bdc_field using 'P2001-BEGDA'

      wa_inf-from_date.

      perform bdc_field using 'P2001-ENDDA'

      wa_inf-to_date.

      perform bdc_transaction using 'PA30'.

      ENDLOOP.

      endform. " upload_data

      &----


      *& Form bdc_dynpro

      &----


      • text

      ----


      • -->P_0646 text

      • -->P_0647 text

      ----


      form bdc_dynpro using program

      dynpro.

      CLEAR wa_bdcdata.

      wa_bdcdata-program = program.

      wa_bdcdata-dynpro = dynpro.

      wa_bdcdata-dynbegin = c_x.

      APPEND wa_bdcdata TO bdcdata.

      endform. " bdc_dynpro

      &----


      *& Form bdc_field

      &----


      • text

      ----


      • -->P_0651 text

      • -->P_0652 text

      ----


      form bdc_field USING fnam fval.

      CLEAR wa_bdcdata.

      wa_bdcdata-fnam = fnam.

      wa_bdcdata-fval = fval.

      APPEND wa_bdcdata TO bdcdata.

      endform. " bdc_field

      &----


      *& Form bdc_transaction

      &----


      • text

      ----


      • -->P_0735 text

      ----


      form bdc_transaction USING tcode.

      TABLES: t100.

      DATA: l_subrc LIKE sy-subrc.

      CONSTANTS: c_ctumode LIKE ctu_params-dismode VALUE 'N',

      c_cupdate LIKE ctu_params-updmode VALUE 'A',

      c_1(2) TYPE c VALUE '&1',

      c_s LIKE bdcmsgcoll-msgtyp VALUE 'S',

      c_a LIKE bdcmsgcoll-msgtyp VALUE 'A',

      c_e LIKE bdcmsgcoll-msgtyp VALUE 'E'.

      REFRESH messtab.

      *Call Transactions

      CALL TRANSACTION tcode USING bdcdata

      MODE c_ctumode

      UPDATE c_cupdate

      MESSAGES INTO messtab.

      *Get Messages into an internal table

      LOOP AT messtab INTO wa_messtab.

      SELECT SINGLE *

      FROM t100

      WHERE sprsl = wa_messtab-msgspra

      AND arbgb = wa_messtab-msgid

      AND msgnr = wa_messtab-msgnr.

      IF sy-subrc = 0.

      l_mstring = t100-text.

      IF l_mstring CS c_1.

      REPLACE '&1' WITH wa_messtab-msgv1 INTO l_mstring.

      REPLACE '&2' WITH wa_messtab-msgv2 INTO l_mstring.

      REPLACE '&3' WITH wa_messtab-msgv3 INTO l_mstring.

      REPLACE '&4' WITH wa_messtab-msgv4 INTO l_mstring.

      ELSE.

      REPLACE '&' WITH wa_messtab-msgv1 INTO l_mstring.

      REPLACE '&' WITH wa_messtab-msgv2 INTO l_mstring.

      REPLACE '&' WITH wa_messtab-msgv3 INTO l_mstring.

      REPLACE '&' WITH wa_messtab-msgv4 INTO l_mstring.

      ENDIF.

      CONDENSE l_mstring.

      **Put all Non Sucess Messages to the internal table

      IF wa_messtab-msgtyp EQ c_e or wa_messtab-msgtyp EQ c_a.

      READ TABLE it_outtab TRANSPORTING NO FIELDS WITH KEY pernr = wa_inf-pernr from_date = wa_inf-from_date

      to_date = wa_inf-to_date mstring = l_mstring.

      IF sy-subrc <> 0.

      MOVE-CORRESPONDING wa_inf to wa_outtab.

      wa_outtab-subtype = 'L1'.

      wa_outtab-msgtyp = 'E'.

      wa_outtab-mstring = l_mstring.

      wa_outtab-exception = 1.

      APPEND wa_outtab to it_outtab.

      ENDIF.

      ELSEIF wa_messtab-msgtyp EQ c_s.

      READ TABLE it_outtab TRANSPORTING NO FIELDS WITH KEY pernr = wa_inf-pernr from_date = wa_inf-from_date

      to_date = wa_inf-to_date mstring = l_mstring.

      IF sy-subrc <> 0.

      MOVE-CORRESPONDING wa_inf to wa_outtab.

      wa_outtab-subtype = 'L1'.

      wa_outtab-msgtyp = 'S'.

      wa_outtab-mstring = l_mstring.

      wa_outtab-exception = 3.

      APPEND wa_outtab to it_outtab.

      ENDIF.

      ENDIF.

      ENDIF.

      CLEAR: wa_messtab,

      wa_outtab.

      ENDLOOP.

      REFRESH bdcdata.

      endform. " bdc_transaction

      &----


      *& Form fill_create_salv

      &----


      • text

      ----


      • --> p1 text

      • <-- p2 text

      ----


      form fill_create_salv .

      TRY.

      CALL METHOD cl_salv_table=>factory

      IMPORTING

      r_salv_table = gr_outtab

      CHANGING

      t_table = it_outtab.

      CATCH cx_salv_msg .

      ENDTRY.

      gr_functions = gr_outtab->get_functions( ).

      gr_functions->set_all( abap_true ).

      gr_columns = gr_outtab->get_columns( ).

      gr_columns->set_optimize( abap_true ).

      TRY.

      gr_column ?= gr_columns->get_column( 'PERNR' ).

      gr_column->set_short_text( 'Per No.' ).

      gr_column->set_medium_text( 'Personnel No.' ).

      gr_column->set_long_text( 'Personnel No.' ).

      gr_column->set_tooltip( 'Personnel No.' ).

      CATCH cx_salv_not_found .

      ENDTRY.

      TRY.

      gr_column ?= gr_columns->get_column( 'FROM_DATE' ).

      gr_column->set_short_text( 'Start Date' ).

      gr_column->set_medium_text( 'Start Date' ).

      gr_column->set_long_text( 'Start Date' ).

      gr_column->set_tooltip( 'Start Date' ).

      CATCH cx_salv_not_found .

      ENDTRY.

      TRY.

      gr_column ?= gr_columns->get_column( 'TO_DATE' ).

      gr_column->set_short_text( 'End Date' ).

      gr_column->set_medium_text( 'End Date' ).

      gr_column->set_long_text( 'End Date' ).

      gr_column->set_tooltip( 'End Date' ).

      CATCH cx_salv_not_found .

      ENDTRY.

      TRY.

      gr_column ?= gr_columns->get_column( 'SUBTYPE' ).

      gr_column->set_short_text( 'Subtype' ).

      gr_column->set_medium_text( 'Subtype' ).

      gr_column->set_long_text( 'Subtype' ).

      gr_column->set_tooltip( 'Subtype' ).

      CATCH cx_salv_not_found .

      ENDTRY.

      TRY.

      gr_column ?= gr_columns->get_column( 'MSGTYP' ).

      gr_column->set_long_text( 'Message Type' ).

      gr_column->set_medium_text( 'Msg Type' ).

      gr_column->set_short_text( 'Msg Typ' ).

      gr_column->set_tooltip( 'Message Type' ).

      CATCH cx_salv_not_found .

      ENDTRY.

      TRY.

      gr_column ?= gr_columns->get_column( 'MSTRING' ).

      gr_column->set_long_text( 'Message Text' ).

      gr_column->set_medium_text( 'Msg Text' ).

      gr_column->set_short_text( 'Msg Txt' ).

      gr_column->set_tooltip( 'Message Text' ).

      CATCH cx_salv_not_found .

      ENDTRY.

      TRY.

      gr_columns->set_exception_column( 'EXCEPTION' ).

      CATCH cx_salv_data_error. "#EC NO_HANDLER

      ENDTRY.

      TRY.

      gr_column ?= gr_columns->get_column( 'EXCEPTION' ).

      gr_column->set_short_text( 'Status' ).

      gr_column->set_medium_text( 'Status' ).

      gr_column->set_long_text( 'Status' ).

      gr_column->set_tooltip( 'Status' ).

      CATCH cx_salv_not_found. "#EC NO_HANDLER

      ENDTRY.

      *Display ALV

      CALL METHOD gr_outtab->display.

      endform. " fill_create_salv

      Add a comment
      10|10000 characters needed characters exceeded

    • author's profile photo Former Member
      Former Member
      Posted on Jan 12, 2009 at 01:08 PM

      Hi,

      Check the below BDC code for 0416 update...

      FORM create_0416_record USING p_mode TYPE any.
      
      * Build infotype data for BDC session
        PERFORM build_bdc_infotype USING p_mode.
      
        IF p_ctran = c_y.
      *   Build Call Transaction
          PERFORM build_call_transaction.
        ELSE.
      *   Build BDC session.
          PERFORM build_bdc_session.
        ENDIF.
      
      ENDFORM.                                            "Create_0416_record
      *&---------------------------------------------------------------------*
      *&      Form  build_bdc_infotype
      *&---------------------------------------------------------------------*
      *       To build the infotype data
      *----------------------------------------------------------------------*
      *       --> P_MODE  '=MOD' or "=INS"
      *----------------------------------------------------------------------*
      FORM build_bdc_infotype USING p_mode TYPE any.
      
        DATA:     l_begda   TYPE char10.
        CONSTANTS c_0416(4) TYPE c       VALUE '0416'.
      
        REFRESH i_bdc_data.
        WRITE g_begda TO l_begda.
      
        PERFORM bdc_dynpro      USING 'SAPMP50A'    '1000'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'RP50G-PERNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
        PERFORM bdc_field       USING 'RP50G-PERNR' i_final_line-pernr.
        PERFORM bdc_field       USING 'RP50G-TIMR6' 'X'.
        PERFORM bdc_dynpro      USING 'SAPMP50A'    '1000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  p_mode.
        PERFORM bdc_field       USING 'RP50G-PERNR' i_final_line-pernr.
        PERFORM bdc_field       USING 'RP50G-TIMR6' 'X'.
        PERFORM bdc_field       USING 'RP50G-BEGDA' l_begda.
        PERFORM bdc_field       USING 'RP50G-ENDDA' l_begda.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'RP50G-SUBTY'.
        PERFORM bdc_field       USING 'RP50G-CHOIC' c_0416.
        PERFORM bdc_field       USING 'RP50G-SUBTY' '1000'.
      
        PERFORM bdc_dynpro      USING 'MP041600'    '2000'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'P0416-NUMBR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
        PERFORM bdc_field       USING 'P0416-BEGDA' l_begda.
        PERFORM bdc_field       USING 'P0416-NUMBR' i_final_line-quota_days.
      
        IF p_test EQ c_y.
          PERFORM bdc_dynpro      USING 'MP041600'    '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '/EBCK'.
          PERFORM bdc_dynpro      USING 'SAPLSPO1' '0200'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=YES'.
        ELSE.
          PERFORM bdc_dynpro      USING 'MP041600'    '2000'.
          PERFORM bdc_field       USING 'BDC_CURSOR'  'P0416-BEGDA'.
          PERFORM bdc_field       USING 'BDC_OKCODE'  '=UPD'.
          PERFORM bdc_field       USING 'P0416-BEGDA' l_begda.
          PERFORM bdc_field       USING 'P0416-NUMBR' i_final_line-quota_days.
        ENDIF.
      
        PERFORM bdc_dynpro    USING 'SAPMP50A'    '1000'.
        PERFORM bdc_field     USING 'BDC_OKCODE'  '=BACK'.
      
      ENDFORM.                                            "build_bdc_infotype
      *&---------------------------------------------------------------------*
      *&      Form  bdc_dynpro
      *&---------------------------------------------------------------------*
      *       To build bdc data(Program name and screen number)
      *----------------------------------------------------------------------*
      FORM bdc_dynpro  USING p_program TYPE any
                             p_dynpro  TYPE any.
      
        i_bdc_data_line-program  = p_program.
        i_bdc_data_line-dynpro   = p_dynpro.
        i_bdc_data_line-dynbegin = c_x.
        APPEND i_bdc_data_line TO i_bdc_data.
        CLEAR i_bdc_data_line.
      
      ENDFORM.                    " bdc_dynpro
      *&---------------------------------------------------------------------*
      *&      Form  bdc_field
      *&---------------------------------------------------------------------*
      *       To build bdc data(Field name and BDC field value)
      *----------------------------------------------------------------------*
      *      -->P_FNAM  Field name
      *      -->P_FVAL  BDC field value
      *----------------------------------------------------------------------*
      FORM bdc_field  USING p_fnam TYPE any
                            p_fval TYPE any.
      
        i_bdc_data_line-fnam = p_fnam.
        i_bdc_data_line-fval = p_fval.
        APPEND i_bdc_data_line TO i_bdc_data.
        CLEAR i_bdc_data_line.
      
      ENDFORM.                    " bdc_field
      *&---------------------------------------------------------------------*
      *&      Form  build_bdc_session
      *&---------------------------------------------------------------------*
      *       To build BDC session
      *----------------------------------------------------------------------*
      FORM build_bdc_session.
      
      * Add BDC error count
        ADD 1 TO g_bdc_cnt.
      
        IF g_bdc_cnt EQ 1.
          PERFORM open_group.
        ENDIF.
      
        CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            tcode     = c_pa30
          TABLES
            dynprotab = i_bdc_data.
      
      ENDFORM.                    " build_bdc_session
      *&---------------------------------------------------------------------*
      *&      Form  open_group
      *&---------------------------------------------------------------------*
      *       To Open batch input session for adding transactions
      *----------------------------------------------------------------------*
      FORM open_group.
      
        CALL FUNCTION 'BDC_OPEN_GROUP'
          EXPORTING
            client = sy-mandt
            group  = c_bdcnam
            user   = sy-uname
            keep   = c_x.
      
      ENDFORM.                    " open_group
      *&---------------------------------------------------------------------*
      *&      Form  close_group
      *&---------------------------------------------------------------------*
      *       To Close batch input session
      *----------------------------------------------------------------------*
      FORM close_group.
      
        CALL FUNCTION 'BDC_CLOSE_GROUP'.
      
      ENDFORM.                    " close_group
      *&---------------------------------------------------------------------*
      *&      Form  build_call_transaction
      *&---------------------------------------------------------------------*
      *       To call the transaction
      *----------------------------------------------------------------------*
      *      -->P_PERNR  Personnel Number
      *----------------------------------------------------------------------*
      FORM build_call_transaction.
      
        DATA: l_errormsg TYPE t_error-errmsg.                   "Error Message
      
        REFRESH i_msg_tab.
        CALL TRANSACTION c_pa30 USING i_bdc_data MODE p_trmode
                                                 MESSAGES INTO i_msg_tab.
        IF sy-subrc NE 0.
      *   Process as error if message type is E or A. if it is type S, it is
      *   only an error if it is 347, 348, 344"No batch input data for screen
          LOOP AT i_msg_tab INTO i_msg_tab_line
                            WHERE msgtyp = c_e OR msgtyp = c_a
                  OR ( msgtyp = 'S' AND msgid  = '00' AND msgnr = '347' )
                  OR ( msgtyp = 'S' AND msgid  = '00' AND msgnr = '348' )
                  OR ( msgtyp = 'S' AND msgid  = '00' AND msgnr = '344' ).
            CALL FUNCTION 'MASS_MESSAGE_GET'
              EXPORTING
                sprsl             = sy-langu
                arbgb             = i_msg_tab_line-msgid
                msgnr             = i_msg_tab_line-msgnr
                msgv1             = i_msg_tab_line-msgv1
                msgv2             = i_msg_tab_line-msgv2
                msgv3             = i_msg_tab_line-msgv3
                msgv4             = i_msg_tab_line-msgv4
              IMPORTING
                msgtext           = l_errormsg
              EXCEPTIONS
                message_not_found = 1
                OTHERS            = 2.                            "#EC *
            WRITE l_errormsg TO e_error_line-errmsg.              "#EC *
            PERFORM append_error_rec.
            PERFORM build_bdc_session.
            EXIT.
          ENDLOOP.
        ELSE.
          ADD 1 TO g_success_cnt.
        ENDIF.
      
      ENDFORM.                    " build_call_transaction
      *&---------------------------------------------------------------------*
      *&      Form  append_error_rec
      *&---------------------------------------------------------------------*
      *       Append error record to error internal table
      *----------------------------------------------------------------------*
      FORM append_error_rec.
        MOVE: i_final_line-pernr TO e_error_line-pernr,
              i_final_line-pnalt TO e_error_line-pnalt,
              i_final_line-ename TO e_error_line-ename,
              i_final_line-quota_days TO e_error_line-quota_days.
      
        APPEND e_error_line TO e_error.
        MOVE   e_error_line-errmsg TO errmsg1.
        CLEAR  e_error_line.
        ADD 1 TO g_error_cnt.
      ENDFORM.                    " append_error_rec

      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.