Creation of Database table using function module DB_CREATE_TABLE

I used the function module DB_CREATE_TABLE to create a database table from a report program.
The SY-SUBRC value being returned is 0 but I am not able to access the table using SE11(that is if it gets created). Kindly let me know if you know how to resolve this problem.
Is there any other function module to create a database table from a report program?
Thanks & Regards,
Pranjali

Hello,
Check this programs how they are using the this FM.
LSDB3U14
LSDB6U04                               DD: Creation of temporary tables (only keys or complete)
LSMC2F00                               Procedures for Creating and Deleting Dependent Matchcode ID Objects
LSUGXU08
LSUGXU18                             Rückgabe aller DB-spezifischen Parameter der Freiplatzprüfung im Upgra
RCNV0002                               DD: Convert CDHDR and CDPOS
RDDMV4TB                               Generate Exchange TADIR
RDDMVCUA                               Generate Exchange TADIR
RDDMVFTX                               Repository Switch: Generate New Empty Clone Table DDFTX
RDDMVNTB                               Filling the Exchange Nametabs (DDYTT, DDYTF)
RDDMVTRE                               Generate Exchange TADIR
RSINFINI                               INFORMIX Performance Monitor: Additional DB Definitions for SAP R/3
RTXWCF1F                               Include LTXW4F01

Similar Messages

  • Download database table content into internal table using Function Module?

    HI,
    Experts,
    I need a function module which can download ddic table content into internal table.
    Thank u ,
    Shabeer Ahmed.

    >
    shabeer ahmed wrote:
    > HI,
    > Experts,
    >
    > I need a function module which can download ddic table content into internal table.
    >
    > Thank u ,
    > Shabeer Ahmed.
    Hi Shabeer,
      We don't require a function module to download ddic table content to an internal table. We can use the SELECT statement for the same. Example would be:-
    DATA: <INTERNAL TABLE> type table of <DATABASE>.
    SELECT * FROM <DATABASE> into corresponding fields of <INTERNAL TABLE>.
    Also, function module might be required when you need the data from a remote system, but then it is the developer's task create this function module and the function module should be remote enabled function module.
    This remote enable function module should have the above SELECT query as its code.
    Many Regards,
    Ravi.

  • Update a Table Field of QMEL Table Using Function Module

    hello Guru
    I want to update a field of QMEL table suing FM which was created by user. how to write code for that. i have some idea but it is not helpful for us.....
    Moderator Message: Searching the forums/Google is a good start.
    Edited by: kishan P on May 19, 2011 12:13 PM

    hi Ram,
    You can use update query on table setting particular field value...There is no Function module for it.
    Regards,
    Pawan.

  • Getting Data from Structure and Store Data into Table using Function Module

    Hello...
    we are created a function module to import 2 structures in the systems and want to read the data from the structure into a customized table when the fucntion module is called. However, whenever the function module is run, we only managed to have one data into the customized table whereas the actual results is that there will be a few records in this customized table.

    Hi,
    It should be something like this...
    TABLES ZRESMORT.
    DATA E_ZRESMORT TYPE STANDARD TABLE OF ZRESMORT WITH HEADER LINE.
    SELECT * FROM ZRESMORT.    <=====================
      DELETE ZRESMORT.              <==================  It is deleting all the records in your Z table
    ENDSELECT.    <===============================
    Loop at I_CKF_CONTRACT.  " Assuming this is the Main Table
    Read table I_CKF_PROCESS with key ." Here you will read this table to get the corresponding records of Table I_CKF_CONTRACT
    E_ZRESMORT-MORT_FT_ID  = I_CKF_CONTRACT-COMMON-CONTRACT_ID_EXT.
    E_ZRESMORT-MORT_KDATE  = I_CKF_PROCESS-TECHNICAL-KEY_DATE.
    E_ZRESMORT-MORT_TSTAMP = I_CKF_PROCESS-TECHNICAL-TIMESTAMP.
    E_ZRESMORT-MORT_FLAG   = 1.
    E_ZRESMORT-MORT_BUPA   = I_CKF_CONTRACT-BUPA-BUSINESS_PARTNER_ID.
    E_ZRESMORT-MORT_PORTFO = I_CKF_CONTRACT-BUPA-PORTFOLIO_CAT.
    E_ZRESMORT-MORT_FT_ID_DUM  = I_CKF_CONTRACT-COMMON-CONTRACT_ID.
    INSERT INTO ZRESMORT VALUES E_ZRESMORT.
    IF SY-SUBRC EQ 0.
    ENDIF.
    endloop.

  • Error with quantity field:Datasource Creation Using Function Module method

    Problem with DATASOURCE Creation using Function Module method :
    I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
    Let me know if my explanation is not clear enough.
    Thanks in advance,
    Neha.
    Z table definition is as below :
    MATNR MATNR CHAR 18 0 Material Number
    BWKEY BWKEY CHAR 4 0 Valuation area
    LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
    STPRS STPRS CURR 11 2 Standard Price   " Here the currency field is WAERS and table T001
    PEINH PEINH DEC 5 0 Price Unit
    VJSTP VJSTP CURR 11 2 Standard price in previous year
    VJPEI VJPEI DEC 5 0 Price unit of previous year.
    Edited by: Neha Rathi on Jan 30, 2009 3:03 PM

    Hi,
    You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
    Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
    also if you want to populate it then you will have to write the code for this fields as well.
    Thanks
    Ajeet

  • How to update field values in a database table using module pool prg?

    hi
    how to update field values in a database table using module pool prg?
    we created a customized table, and we put 2 push buttons in screen painter update and display.
    but update is not working?
    data is enter into screen fields and to internal table, but it is not updated in database table.
    thanks in adv
    vidya

    HI,
    we already used the update statement. but its not working.
    plz check this.
    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.
    endform.                    " move_data
    thanks in adv
    vidya

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • Creation of Generic Data source using function module based on the program which was used to created ABAP report

    Hi,
    We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
    Thanks,
    Ravi

    Hi,
    Step1-Create a table structure which you need to create same as the fields you require in you data source.
    Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
    Step 3-create infoset query.In the infoset query give your table structure name and  program name which you developed.
    Step4-create data source on top of that query

  • Generic Extraction By Using function Module with Three Table fields?

    Hi,
    I need to bring the data from three tables by using function module.
    Tables: VBAK, VBAP, VBUK.
    Fields are: VBELN, ERDAT, NETWR, WEARK, POSNR, MATNR, FKART, FKTYP.
    i referred some of the documents in SDN, it explained by using two table fields.
    Please help me.

    hi, the below pseudo code should help you on creating the logic. It's based on the how to paper. So i just used the parts of intrest. You need to copy the rest form the document. Please notice that this is pseudo code. if you just copy/paste, it will not work.
    IF s_counter_datapakid = 0.
    OPEN CURSOR WITH HOLD s_cursor FOR
           SELECT fields       FROM table1         WHERE condition
          ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
          FETCH NEXT CURSOR s_cursor
                    INTO  TABLE e_t_data
                    PACKAGE SIZE s_s_if-maxsize.
         IF sy-subrc EQ 0.
           SELECT fields      FROM table2      WHERE condition into itab2 for all entries in e_t_data
           SELECT fields      FROM table3       WHERE condition into itab3 for all entries in e_t_data    
         loop at e_t_data
              read itab2. move corresponding fields to e_t_data
              read itab3. move corresponding fields to e_t_data
              collect e_t_data.
         endif.
    IF sy-subrc <> 0.
           CLOSE CURSOR s_cursor.
           RAISE no_more_data.
         ENDIF.
         s_counter_datapakid = s_counter_datapakid + 1.
       ENDIF.              "Initialization mode or data extraction ?

  • Can anybody explain me creating Generic Datasource using Function module?

    Hi,
    can anybody explain me creating Generic Datasource using Function module?
    Thax in advance,
    Ravi.

    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    1. Create s structure with the fields that you need from the 4 tables . Activate.
    2. Goto SE 80 Select The Function Group , Copy , Select the Function module
    " RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
    Y or Z .
    3. SE37 ->Your Function module name -> Change , In table tab give your structure
    name by deleting the associated type given in " E_T_DATA " .
    4. Now select source code and Do the coding . Give Data source name in Coding .
    In your case you have to take data from more that 1 table .
    5. Activate the Function Group .
    6. In RSO2 Create the Data source , Give the Function Module Name , And Save.
    7. RSA3 -> Give data source name and Check for the Records .
    Creation of custom datasource. (Using function module)
    <b>is an example</b>
    1.Create a function group .
    2. Structure ZTEST123
    ZMATNR MATNR CHAR 18 0 Material Number
    ZMTART MTART CHAR 4 0 Material type
    ZMBRSH MBRSH CHAR 1 0 Industry sector
    ZMATKL MATKL CHAR 9 0 Material group
    ZBISMT BISMT CHAR 18 0 Old material number
    ZMAKTX MAKTX CHAR 40 0 Material description
    3. Create function module (i.e. ZTEST….) .
    FM - YMARA_DATA_TRNS
    FUNCTION YMARA_DATA_TRNS.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
    *" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *" TABLES
    *" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *" E_T_DATA STRUCTURE ZTEST123 OPTIONAL
    *" EXCEPTIONS
    *" NO_MORE_DATA
    *" ERROR_PASSED_TO_MESS_HANDLER
    data : ZTEST123 type ZTEST123 occurs 0 with header line.
    Maximum number of lines for DB table
    STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    S_COUNTER_DATAPAKID LIKE SY-TABIX.
    DATA: begin of t_mara occurs 0,
    ZMATNR type MATNR,
    ZMTART type MTART,
    ZMBRSH type MBRSH,
    ZMATKL type MATKL,
    ZBISMT type BISMT,
    end of t_mara.
    DATA: begin of t_makt occurs 0,
    ZMATNR type MATNR,
    ZMAKTX type MAKTX,
    end of t_makt.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
    IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Check DataSource validity
    CASE I_DSOURCE.
    WHEN 'ZZMARA_DATA'.
    WHEN OTHERS.
    IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
    LOG_WRITE 'E' "message type
    'R3' "message class
    '009' "message number
    I_DSOURCE "message variable 1
    ' '. "message variable 2
    RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
    Fill parameter buffer for data extraction calls
    S_S_IF-REQUNR = I_REQUNR.
    S_S_IF-DSOURCE = I_DSOURCE.
    S_S_IF-MAXSIZE = I_MAXSIZE.
    ELSE. "Initialization mode or data extraction ?
    Data transfer: First Call OPEN CURSOR + FETCH
    Following Calls FETCH only
    First data package -> OPEN CURSOR
    IF S_COUNTER_DATAPAKID = 0.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
    select MATNR
    MTART
    MBRSH
    MATKL
    BISMT
    from mara up to 10 rows
    into table t_mara.
    if not t_mara[] is initial.
    select MATNR
    maktx
    from makt
    into table t_makt
    for all entries in t_mara
    where matnr = t_mara-zmatnr.
    endif.
    loop at t_mara.
    read table t_makt with key zmatnr = t_mara-zmatnr.
    ZTEST123-zmatnr = t_mara-zmatnr.
    ZTEST123-ZMTART = t_mara-ZMTART.
    ZTEST123-ZBISMT = t_mara-ZBISMT.
    ZTEST123-ZMBRSH = t_mara-ZMBRSH.
    ZTEST123-ZMATKL = t_mara-ZMATKL.
    ZTEST123-zmaktx = t_makt-zmaktx.
    append ZTEST123.
    clear ZTEST123.
    endloop.
    clear E_T_DATA.
    refresh E_T_DATA.
    E_T_DATA[] = ZTEST123[].
    ENDIF.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    ENDIF. "Initialization mode or data extractio
    ENDFUNCTION.
    3. Create the data source using transaction (RSO2).
    4. If structure exists for the table parameter of your function module then ok else create a structure for the table parameter ‘E_T_DATA’.
    5. Test the datasource in R/3 using transaction RSA3.
    6. Transfer the data source to BW –System and replicate it in the BW-System.

  • Exporting Custom table through function module

    <b>How can i Export Custom table through function module.</b> when we add some table in the function module table tab it asks for a ref. table which is some table in database .. but i want to add some custom table with some user defined column names..how can i do this
    <b>n plz tell me how to loop thru select options</b>
    i have to loop thru select option and assign all the values to a variable.
    plz help me out
    Message was edited by:
            Karan Chopra

    Hi Karan,
    Do one thing, Just in the tables tab give the name of the table and don't write anything else. no TYPE and no ANY.
    Hope it will resolve issue.
    reward points if useful.
    Regards,
    Atish

  • Amendment to Datasource using Function Module

    Alright Guys,
    Can someone help me? I have amended the '0PU_IS_PS_43' datasource and I need to 'unhide' the new fields I have added. I have logged into trans RSO2 to unhide these fields, but received the following warning - how do I resolve this?
    "DataSource 0PU_IS_PS_43 is extracted using functional module FM_BW_BUDGET_ENTRY_DOCUMENTS
    Message no. RJ042
    Diagnosis
    Up to now, DataSource 0PU_IS_PS_43 has been extracted using function module FM_BW_BUDGET_ENTRY_DOCUMENTS If you edit and save the DataSource using maintenance of the generic extraction, the extraction  will no longer be extracted using this function module, instead this will be done using a database view, a transparent table, an InfoSet of the SAP query or a user-defined extraction module.
    If 0PU_IS_PS_43 is included in delivered SAP Content, you can reactivate the extraction using function module FM_BW_BUDGET_ENTRY_DOCUMENTS by transferring this content with transaction RSA5 or the IMG."
    Thanks,
    Scott

    Hi
    You do not hide/unhide or manipulate this DA thru RSO2 (as its also obvious from the message) but rather thru RSA5 and you should extend the DS via User Exit (CMOD).
    Reg's
    Edan

  • How to maintain Ztable using function module instead of SM30

    Hi Friends,
    please tell me , How to maintain Ztable or view using function module instead of SM30.
    Thanks,
    Veerendra.

    Hi,
    You can design your report and use Function module VIEW_MAINTENANCE_CALL for that.
    You need to use Action type as 'S' for displaying and 'U' for maintaining the table.
    Ex:
    CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
      EXPORTING
        ACTION                               =  'S'
        VIEW_NAME                            =  'Table Name'
    EXCEPTIONS
       CLIENT_REFERENCE                     = 1
       FOREIGN_LOCK                         = 2
       INVALID_ACTION                       = 3
       NO_CLIENTINDEPENDENT_AUTH            = 4
       NO_DATABASE_FUNCTION                 = 5
       NO_EDITOR_FUNCTION                   = 6
       NO_SHOW_AUTH                         = 7
       NO_TVDIR_ENTRY                       = 8
       NO_UPD_AUTH                          = 9
       ONLY_SHOW_ALLOWED                    = 10
       SYSTEM_FAILURE                       = 11
       UNKNOWN_FIELD_IN_DBA_SELLIST         = 12
       VIEW_NOT_FOUND                       = 13
       OTHERS                               = 14.
    Hope this helps.
    Message was edited by: Imtiaz Ahmed

  • Hi. i used Function module to change Characteristic values of a sales order

    hi. i used Function module to change Characteristic values of a sales order..
    but sales order's Characteristic values didn't change.
    And the Function module doesn't occur any log message.
    please tell me wrong code, and how to solve this problem.
    if i have wrong method, what data can i pass to change the characteristic values
    DATA: LT_E1CUVAL    TYPE TABLE OF E1CUVAL.
      DATA: WA_E1CUVAL    TYPE E1CUVAL.
      DATA: LS_CFG_HEAD   LIKE CUXT_CUCFG_S,
            LS_INSTANCES  LIKE CUXT_CUINS_S,
            LS_VALUES     LIKE CUXT_CUVAL_S,
            LS_E1CUCFG    LIKE E1CUCFG,
            LS_E1CUINS    LIKE E1CUINS,
            LS_E1CUVAL    LIKE E1CUVAL,
            LS_PROFILE    LIKE E1CUCOM,
            LS_VBAP       LIKE VBAP,
            L_CUOBJ       LIKE INOB-CUOBJ,
            L_ATINN       LIKE CABN-ATINN.
      DATA: LT_INSTANCES  LIKE CUXT_CUINS_S OCCURS 0,
            LT_PART_OF    LIKE CUXT_CUPRT_S OCCURS 0,
            LT_VALUES     LIKE CUXT_CUVAL_S OCCURS 0,
            LT_VAR_KEYS   LIKE CUXT_CUVK_S  OCCURS 0,
            LT_KSML       LIKE KSML         OCCURS 0 WITH HEADER LINE,
            BEGIN OF LT_CLINT OCCURS 0,
              CLINT  LIKE KSSK-CLINT,
            END OF LT_CLINT.
      DATA: LT_CUIB       LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
      DATA: E_ROOT_INSTANCE           TYPE     CUXT_INSTANCE_NO.
      DATA: EV_ROOT_PERSIST_ID     TYPE     IBEXTINST_DATA-EXT_INST_ID.
      DATA: EV_CFG_HAS_CHANGED     TYPE     XFELD.
      DATA: EV_HANDLE_APPL_LOG     TYPE     BALLOGHNDL.
      DATA: L_CUOBJ_NEW           TYPE CUOBJ.
      DATA: L_OWNER               TYPE IBXX_BUSINESS_OBJECT.
      REFRESH LT_E1CUVAL.
      CLEAR LS_VBAP.
      SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
                                FROM VBAP WHERE VBELN = I_VBELN
                                            AND POSNR = I_POSNR.
      IF SY-SUBRC <> 0.
        RAISE INSTANCE_NOT_FOUND.
      ENDIF.
      REFRESH LT_CUIB. CLEAR LT_CUIB.
      LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
      APPEND LT_CUIB.
      CALL FUNCTION 'CUCB_INITIALIZER'
        EXPORTING
          IT_INSTANCES = LT_CUIB[].
      CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
        EXPORTING
          I_ROOT_INSTANCE              = LS_VBAP-CUOBJ
        IMPORTING
          E_CFG_HEAD                   = LS_CFG_HEAD
          ES_PROFILE                   = LS_PROFILE
          ET_RETURN                    = ET_RETURN
        TABLES
          E_TAB_INSTANCES              = LT_INSTANCES
          E_TAB_PART_OF                = LT_PART_OF
          E_TAB_VALUES                 = LT_VALUES
          E_TAB_VAR_KEYS               = LT_VAR_KEYS
        EXCEPTIONS
          INVALID_INSTANCE             = 1
          NO_ROOT_INSTANCE             = 2
          INSTANCE_IS_A_CLASSIFICATION = 3
          INTERNAL_ERROR               = 4
          NO_PROFILE_FOUND             = 5
          INVALID_DATA                 = 6
          OTHERS                       = 7.
      IF SY-SUBRC <> 0.
        CASE SY-SUBRC.
          WHEN 1.
            RAISE INSTANCE_NOT_FOUND.
          WHEN 3.
            RAISE INSTANCE_IS_A_CLASSIFICATION.
          WHEN OTHERS.
            RAISE INVALID_DATA.
        ENDCASE.
      ELSE.
        LOOP AT LT_VALUES INTO LS_VALUES.
          IF    LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
             OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
            LS_VALUES-VALUE = '7100010'. "This is test data
            MODIFY LT_VALUES FROM LS_VALUES.
          ELSE.
            DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
          ENDIF.
          CLEAR LS_VALUES.
        ENDLOOP.
      ENDIF.
    &#50689;&#50629;&#51221;&#48372; &#53945;&#49457; &#48320;&#44221;
      CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
        EXPORTING
          I_CFG_HEADER                        = LS_CFG_HEAD
          I_ROOT_INSTANCE                     = LS_VBAP-CUOBJ
        I_PLANT                             =
        I_STRUCTURE_EXPLOSION_DATE          =
        I_STRUCTURE_EXPLOSION_APPL_ID       =
        I_LOGSYS                            =
          IS_PROFILE                          = LS_PROFILE
        IV_ONLY_SINGLE_LEVEL                =
        IV_HANDLE_APPL_LOG                  =
        IV_OBJECT_APPL_LOG                  = 'CIF'
        IV_SUBOBJECT_APPL_LOG               = 'T_CNFG'
        IMPORTING
          E_ROOT_INSTANCE                     = E_ROOT_INSTANCE
          EV_ROOT_PERSIST_ID                  = EV_ROOT_PERSIST_ID
          EV_CFG_HAS_CHANGED                  = EV_CFG_HAS_CHANGED
          EV_HANDLE_APPL_LOG                  = EV_HANDLE_APPL_LOG
          ET_RETURN                           = ET_RETURN
        TABLES
          I_TAB_INSTANCES                     = LT_INSTANCES
          I_TAB_PART_OF                       = LT_PART_OF
          I_TAB_VALUES                        = LT_VALUES
          I_TAB_VAR_KEYS                      = LT_VAR_KEYS
        I_TAB_BLOB                          =
        EXCEPTIONS
          NO_CONFIGURATION_DATA               = 1
          NO_ROOT_INSTANCE                    = 2
          INVALID_INSTANCE                    = 3
          INSTANCE_IS_A_CLASSIFICATION        = 4
          INTERNAL_ERROR                      = 5
          NO_PROFILE_FOUND                    = 6
          INVALID_DATA                        = 7
          OTHERS                              = 8
      IF SY-SUBRC <> 0.
        CASE SY-SUBRC.
          WHEN 1.
            RAISE NO_CONFIGURATION_DATA.
          WHEN 3.
            RAISE NO_ROOT_INSTANCE.
          WHEN 3.
            RAISE INVALID_INSTANCE .
          WHEN 3.
            RAISE INSTANCE_IS_A_CLASSIFICATION.
          WHEN 3.
            RAISE INTERNAL_ERROR.
          WHEN OTHERS.
            RAISE INVALID_DATA.
        ENDCASE.
      ENDIF.
      COMMIT WORK.
    save configuration with next commit
      CLEAR: LS_INSTANCES.
      READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
    L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
      L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
      L_OWNER-OBJECT_KEY  = LS_INSTANCES-OBJ_KEY.
      CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
        EXPORTING
          ROOT_INSTANCE         = LS_VBAP-CUOBJ
          ROOT_OBJECT           = L_OWNER
        IMPORTING
          NEW_INSTANCE          = L_CUOBJ_NEW
        EXCEPTIONS
          INVALID_INSTANCE      = 1
          INVALID_ROOT_INSTANCE = 2
          NO_CHANGES            = 3
          OTHERS                = 4.
      IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
        CLEAR LS_VBAP-CUOBJ.
        RAISE INTERNAL_ERROR.
      ELSEIF SY-SUBRC = 1.
        LS_VBAP-CUOBJ = L_CUOBJ_NEW.
      ENDIF.
    What's wrong?
    help me to solve this problem.
    Thanks a lot.

    <b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
    <b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
    <b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
    <b>SD_PARTNER_READ</b> all the partners information and addresses
    <b>SD_DETERMINE_CONTRACT_TYPE</b>
    In: at least VBAK-VBELN
    Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
    <b>SD_SALES_DOCUMENT_COPY</b>
    <b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
    SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
    SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
    RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
    SD_PACKING_PRINT_VIEW
    SD_DELIVERY_VIEW Data collection for printing
    called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
    RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
    regards
    vinod

  • Error in Data selection in R/3 Generic Extraction Using function Modules

    Hi Friends,
    I have created a a generic data source using function module to load data from PA0000 and PA0001 Tables ,Function module is working fine when i execute it indipendently and  the data source is also working fine when i extract data using RSA3. it is showing correct no of records 157.
    When loading data into DSO from BW (using 3.x/7.0 flows) data is comming to PSA  all 157 records but in the RSMO the load status is showing yellow when i look into the step by step analysis it is
    data selection successfully started
    Data selection successfully ended
    All Data packets completed.
    are showing in red.
    after and hour time load getting failed and in the error message it is showing " job terminated in source system---> Request set to red"
    it is giving this message wir no RSM 78.
    Please let me know it

    Hi Jerry,
    Thanks for the immediate replay
    But here in my source system job is getting terminated.
    this is the status of job in Job logs.
    the job is running till this step not going ahead.
    Call customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 157 records 
    Result of customer enhancement: 157 records                             
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 301 records     
    Result of customer enhancement: 157 records                             
    Asynchronous send of data package 000001 in task 0002 (1 parallel tasks)
    pl. update me if any idea.

Maybe you are looking for

  • Cisco Jabber for Mac, possible without a Presence Server?

    Hi all, is it possible to use the cisco jabber client for Mac without a presence server in the uc environment? A customer is looking for Voip Client/Softphone for their Apple Macs. Instant Messaging is no requirement. Regards Steffen

  • Nomad Jukebox Zen Xtra won't turn

    My problem is exactly as the title states. I have a Nomad Jukebox Zen Xtra (40 gig HD) and I cannot get it to power on. This problem has been occuring since yesterday evening. I try to plug it into the computer via the USB cable, but this does nothin

  • Corrupt file type icons in finder

    Hi there, I discovered a problem with small icons in Finder and it's driving me insane that I can't figure out how it happened and how to remedy it. Hope anyone here can help! The symptoms: The problem concerns .mkv and .srt files. In the list or col

  • Track user transactions

    Hi, We have a user ID that was expired a year ago. We want to know how to check the last transaction or last accessed tcode of the user. I tried Sm37 but there were no logs found. Thanks Law

  • White screen, showing a flashing file icon with question mark??

    Having issues with the above, please help