Using Function modules in  BSP - Operations on Service Orders

Hi,
We are creating a custom BSP application for scheduling resources and updating appointments for resource personnel.
The process is as follows:
From the list of Service Orders with some product added as line item, with status OPEN, the user selects a SO and makes an online payment.
Returning from the site, the Status of the Service order is changes to Released. Following this, the available resource is assigned to the Service order and the appointment details are populated in the Service Order. Subsequently, another line item of the Service order is set to Released.
We are using the following function modules in the order as given below:
To set status of a line item to Released
1)     CRM_ORDER_INITIALIZE
2)     CRM_STATUS_SET_INTERN_OW
3)     CRM_STATUS_SAVE_OW
4)     COMMIT WORK
To assign a resource to the Service Order
1)     WFD_RES_GET_AVAIL
2)     CRM_ORDER_INITIALIZE
3)     WFDS_GET_ASSIGNMENT_TO_SO_ITEM
4)     CRM_ORDER_INITIALIZE
5)     WFDS_CRM_SRV_ASSIGNMENT_MODIFY
6)     WFDS_SAVE
7)     WFD_TRANSACTION_COMMI
To update the assignment dates in Service Order
1)     CRM_ORDER_DEQUEUE
2)     CRM_ORDER_INITIALIZE
3)     CRM_ORDER_INIT_OW
4)     CRM_ORDER_MAINTAIN
5)     CRM_ORDER_SAVE
6)     BAPI_TRANSACTION_COMMIT
To set status of a second line item to Released
1)     CRM_ORDER_INITIALIZE
2)     CRM_STATUS_SET_INTERN_OW
3)     CRM_STATUS_SAVE_OW
4)     COMMIT WORK
Using these FM’s in a report program or even in Debug mode works fine, except in the BSP’s where the behavior is random.
The issue that we are facing:
1)     Calling the Function modules sequentially, it takes time to update the order after execution of a BAPI/RFC and at times the order gets locked although we are using the Function Module CRM_ORDER_DEQUEUE after a logical block, and the Service Order is un-available for subsequent actions
2)     At times, the Steps get executed correctly
3)     At times the Steps get executed correctly after adding certain delay after each logical block of steps, but at times the time is not enough for the order to get updated.
Can someone help us solve this un-predictable behavior?
If someone has previously worked on such a requirement, please provide inputs on the scenario.
Also, please let me know if there is a fail-proof procedure to ensure that the steps get executed completely and also if there is a need to use alternative BAPI’s in a specific order.
Thanks,
Regards,
Siddhartha Jain

I am afraid you would have :
- to copy the standard FM 'MS_EXCEL_OLE_STANDARD_DATA' (it is wrapped up into EXCEL_OLE_STANDARD_DAT)
- to comment this line in this newly created FM
  SET PROPERTY OF obj_ex_app 'Visible' = 1.
- to call your own 'ZMS_EXCEL_OLE_STANDARD_DATA'
That should do the trick.

Similar Messages

  • ITSM Service Request - Assigning Categories - Using Function Module

    Hi,
    We are trying to create an ITSM service request ticket from ECC, based on a workflow and its logic. I am calling a remote function module which will contain the logic as explained below.
    I am creating a CRM ITSM service request(incident) ticket using function module CRM_ICSS_SRVREQ_CREATE.
    The ticket is created but some of the fields that I need to populate in the transaction do not have an interface in this function module. I want to specify the category 1, category 2 and category 3.
    I tried function module CRM_ORDER_MAINTAIN but I am unable to find the interface where I can populate this particular data. The component used here is btcategories/categories.
    Can anyone suggest where this particular data needs to be populated.
    Thanks,
    Abdullah

    Hi Abdulla
    What parameter did you set for "Reported By" and "Message Processor" in the FM CRM_ICSS_SRVREQ_CREATE. I am having a lot of problems regarding this. Can you please help?
    Thanks
    Saumyendra

  • How to use function module to update data

    Hello ,
    Can any body have idea how we can use function module SAVE_TEXT to update the master recipe header and operation long text.
    I want to use this functional module to update the master recipe long text
    step by step procedure is highly appreciated
    thanks & regards
    siddhasrth

    Hi
    SAVE_TEXT
    SAVE_TEXT writes a text module back to the text file or the text memory, depending on the storage mode of the corresponding text object.
    You can use this module either to change existing texts or to create new texts. If you know for sure that the text is new, use the parameter INSERT to indicate this. The system then does not have to read the text first, which improves the performance of the function module.
    If the lines table passed with the function module is empty, the system deletes the text from the text file.
    Function call:
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING CLIENT = SY-MANDT
    HEADER = ?...
    INSERT = SPACE
    SAVEMODE_DIRECT = SPACE
    OWNER_SPECIFIED = SPACE
    IMPORTING FUNCTION =
    NEWHEADER =
    TABLES LINES = ?...
    EXCEPTIONS ID =
    LANGUAGE =
    NAME =
    check thi sample code
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    HEADER = t_header
    SAVEMODE_DIRECT = 'X'
    * OWNER_SPECIFIED = ' '
    * LOCAL_CAT = ' '
    * IMPORTING
    * FUNCTION =
    * NEWHEADER =
    TABLES
    LINES = t_long
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5
    Reward all helpfull answers
    Regards
    Pavan

  • Insert record in infotype 0581 using function module

    Hello experts,
    I am using function module HR_INFOTYPE_OPERATION to insert a record in infotype 0581, but its giving exception CX_HRPA_INVALID_INFOTYPE. This infotype is time constraint 1.So how can i handle this.
    Reply will be really helpful <removed by moderator>.
    Edited by: S Harshit on Feb 17, 2012 6:49 AM
    Edited by: Thomas Zloch on Feb 17, 2012

    Hi Mallikarjuna,
    I am trying to pass the rent amount, but unable to, here is the code.
    TYPES: BEGIN OF IT_P0581.
    INCLUDE STRUCTURE P0581.
    TYPES END OF IT_P0581.
    DATA: INFTYKEY LIKE BAPIPAKEY,
    RETURN LIKE BAPIRETURN1.
    DATA: P0581_TAB TYPE TABLE OF IT_P0581 WITH HEADER LINE.
    P0581_TAB-PERNR = 01400038.
    P0581_TAB-INFTY = '0581'.
    P0581_TAB-BEGDA = '20111010'.
    P0581_TAB-ENDDA = '99991231'.
    P0581_TAB-RTAMT = 3000 .
    append P0581_TAB.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = P0581_TAB-INFTY
    NUMBER = P0581_TAB-PERNR
    SUBTYPE = ''
    VALIDITYEND = P0581_TAB-ENDDA
    VALIDITYBEGIN = P0581_TAB-BEGDA
    RECORD = P0581_TAB
    OPERATION = 'INS'
    NOCOMMIT = ''
    RECORDNUMBER = '000'
    DIALOG_MODE = '2'
    IMPORTING
    RETURN = RETURN
    KEY = INFTYKEY
    EXCEPTIONS
    OTHERS = 0.

  • WebReporting using function module WWW_DISPATCH_REQUEST_ORIG

    Dear experts,
    we are using WebReporting in the IACs on ITS; to perform WebReporting we are using function module WWW_DISPATCH_REQUEST_ORIG.
    Now we changed from the external to the intern ITS (using ICF); also we changed from release 470 to release 701. After release change the WebReporting is no more working properly.
    We have the following behavior: after second calling of function module WWW_DISPATCH_REQUEST_ORIG the content of an dedicated report will be outputted for three times.
    It seems to be the buffering of WebReporting output.
    Does anyone have a similar issue?
    Thank you for your feedback.
    Best regards,
    Kurt.

    Hello Oisin,
    Thank you for the information!
    We have the following current BASIS and Kernel patch versions:
    - Kernel-Release: 701
    - Compilation: AIX 2 5 00CB5A5B4C00 Jan 23 2011 21:31:51
    - Patch-Level: 128
    - ABAP-Load: 1565
    - CUA-Load: 32
    - Mode: opt
    - No Unicode-System
    - Patch SAP_BASIS, 701, Level 7, SAPKB70107
    - Basis Plug-In: PI_BASIS, 701, Level 7, SAPK-70107INPIBASIS
    The following URL is called (via ICF):
    http://vsfrd40w.gmsap.migros.ch:8800/sap/bc/gui/sap/its/zwrst?sap-client=754&sap-user=WEISKOPFKU&sap-language=DE&~screen_type=&~store_no=4720&~start_flag=X&~theme=90&~calling_service=z_wosm
    It is a customer individual ICF-Service; the following parameters are set:
    ~SOURCES=ZWRST, WOSZ_FIND, WOSZ_WGS
    ~THEME=90
    ~TRANSACTION=ZRWRST
    Do you have any idea what the issue could be?
    Thank you for your support.
    Best regards,
    Kurt.

  • Calling function module in bsp

    hi all,
    please help me out. i am calling function module in bsp(in on initialization). i am calling 2d_matrix fm. but in output, its not showing the graphics. i think i have to do something in layout also, to connact the FM. Plz help me if you have any idea in bsp.
    thanks in advance.

    thanks for ur reply.
    but i am using it in layout and its giving me an error.
    i have selected all the fields in on initialization.
    and in layout i am displaying my data in tabular form. correspondigly i want to display same data in graphical format.
    for that i have used a FM in on initialization(2d_matrix FM).
    but how i link it in layout . so, that i can give me a output.
    i can understand.
    plz reply me.
    thanks in advance.

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • 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

  • How to lock transaction using function module or something like that

    Hi, all
    I'd like to know the way to lock transacitons using function module or something like that.
    I know this would be possible if calling transaciton SM01, but I want to know other ways like calling function module  (BAPI ) or method.
    Thank you for your cooperation In advance.
    Regards,
    Hideki Kozai

    Hi,
           Try the following FM
    BRF_NETWORK_GRAPHICS           BRF: Network Graphics for BRF Objects
    BRF_INITIALIZE_GRAPHICS_NGR    BRF: Initialize Network Graphics
    BRF_NETWORK_GRAPHICS_NGR       BRF: Network Graphics: Start
    BUSG                           SAP Business Graphics
    GRAPH_2D                       Calling up the 2D business graphics
    GRAPH_2D_MENUE                 DO NOT USE (use 'GRAPH_2D' and 'GRAPH_BUSG_MENU_SET')
    GRAPH_3D                       Calling up the 3D presentation graphics
    GRAPH_BUSG_COLOR_SET           Definition of color pallets for business graphics
    GRAPH_BUSG_MENU_SET            Pushbutton menu (tool bar) for all BUSG modules
    GRAPH_MATRIX                   Calling up SAP Business Graphics (2D, 3D and 4D)
    GRAPH_MATRIX_2D                Calling up the 2D graphics (user-friendly version)
    GRAPH_MATRIX_3D                Structure of 3D graphics (user-friendly version)
    GRAPH_MATRIX_4D                Calling up a 3D graphic (4th dimension stacked representation)
    Regards,

  • 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.

  • ALV  report ON WEB BROWSER USING FUNCTION MODULE

    HI EXPERTS,
    USING FUNCTION MODULE IN ALV ......HOW CAN WE DISPLAY ALV ON BROWSER(INTERNET).

    hi
    good
    go through these links, you ll find detail idea about displaying a ALV output in a browser.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
    http://help.sap.com/saphelp_nw04/helpdata/en/3e/f496ef143a11d4b59f006094192fe3/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm
    thanks
    mrutyun^

  • Custom extractors using function modules

    Hey all
    Does anyone has a document regarding how to <b>Develop Custom extractors using function modules?Step by step method would be great</b>
    Also document regarding <b>CTS in BW?</b>
    Appreciate it
    Thanks

    Hi,
    See here:
    Generic Extractors
    Generic data sources
    Generic DS
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Best regards,
    Eugene

  • 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 occurred while loading Generic extraction using Function module

    Hi all
    I'm trying to do INIT for Generic Extractor using Function module, but i'm getting error as "Error occurred in the source system"
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
    Job terminated in source system --> Request set to red
    Message no. RSM078
    Can u help plz....

    Hi Vishnu
    This are the Job log details i found in source system...Can u tell what whould be the problem?
    Message
    Job started
    Step 001 started (program SBIE0001, variant &0000000002861, user ID
    Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    DATASOURCE = ZYFI102
    RLOGSYS    =
    REQUNR     = REQU_D9Y4CZDQULRIHRRVU33KOLQZO
    UPDMODE    = D
    LANGUAGES  = *
             Current Values for Selected Profile Parameters               *
    abap/heap_area_nondia......... 0                                       *
    abap/heap_area_total.......... 10737418240                             *
    abap/heaplimit................ 40000000                                *
    zcsa/installed_languages...... DE                                      *
    zcsa/system_language.......... E                                       *
    ztta/max_memreq_MB............ 2047                                    *
    ztta/roll_area................ 3000000                                 *
    ztta/roll_extension........... 2000000000                              *
    No authorization for Acct type D
    Job cancelled after system exception ERROR_MESSAGE
    Thanks in advance
    Edited by: MohanDP on Feb 25, 2011 11:58 AM
    Edited by: MohanDP on Feb 25, 2011 12:01 PM

  • 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

  • Display Error Message in BW Report based on Customer Exit Variable

    Hi I need to display an error message in the BW report based on the value of a customer exit variable - i was able to do this successfully in BW3.5 using the below code.   WHEN 'ZUPN'. "Here ZUPN is the customer exit variable     IF i_step = 1.      

  • Apex fop add ttf fonts

    Hello, Im solving problem with PDF printing in Apex 4.1.1 and fop 0.93 running on oc4j . There is problem with some characters displayed as "#" in output pdf. This usually means the selected font doesn't have a glyph for the character. I have studied

  • Attempting to copy to the disk failed. An unknown error occured (-4)

    I am simply trying to sync my son's iTouch with iTunes and I get the following error: "Attempting to copy to the disk failed. An unknown error occured (-4)" All my software (e.g.: iTunes) and the iOS is fully up-to-date. iTunes (v.12.1.0.50) OSX Yose

  • Update? wrt54g v.2

    Do I need to update or download anything for this. I have had it for a year or 2 and have not preformed any updated. I am not haveing any trouble with this model wrt54g v 2. Thanks

  • Browser shuts down when exit frame

    Does anyone have any good suggestions - on how i can exit a frame without my browser shutting down at the same time? I am using System.exit(0); to exit which works fine on Unix but shuts my brower on a PC. I already tried dispose() and setVisible(fal