Reg. usage of FM "SO_NEW_DOCUMENT_ATT_SEND_API1" in background

Dear Experts,
I am using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" to send the PDF attachment data via Outlook Mail. Here i need to pass "Commit work" = 'X'. It is working fine when i execute in Dialog mode / Foreground.
But when i execute in Background / Batch Mode, i get a short Dump as "Pre-commit Check required". 
When i am not setting the parameter "Commit work" = 'X', i get the following message in Tcode SOST "Still no entry in queue".
Is there any other way i can solve the above issue? Kindly help me to resolve the above issue in background.
Any help would be appreciated.
Regards,
Ramesh Manoharan

Hi,
Kindly find the below code going for dump when run in Background:  
LOOP AT lit_pdf INTO lwa_pdf.
      TRANSLATE lwa_pdf USING '~'.
      CONCATENATE lfd_buffer lwa_pdf INTO lfd_buffer.
    ENDLOOP.
    TRANSLATE lfd_buffer USING '~'.
    REFRESH: lit_record.
    DO.
      lwa_record = lfd_buffer.
      APPEND lwa_record TO lit_record.
      CLEAR lwa_record.
      SHIFT lfd_buffer LEFT BY 255 PLACES.
      IF lfd_buffer IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    git_objbin[] = lit_record[].
    REFRESH lit_record.
Create Message Body Title and Description
    gwa_objtxt = lfd_pspid.
    APPEND gwa_objtxt TO git_objtxt.
    CLEAR gwa_objtxt.
    CLEAR: gwa_doc_chng, lfd_lines_txt, lfd_lines_bin.
    gwa_doc_chng-obj_name = 'Project ID'.
    gwa_doc_chng-expiry_dat = sy-datum + 10.
    gwa_doc_chng-obj_descr = 'Project ID'.
    gwa_doc_chng-sensitivty = 'F'.
    gwa_doc_chng-proc_type = 'R'.
    gwa_doc_chng-proc_name = sy-repid.
    DESCRIBE TABLE git_objtxt LINES lfd_lines_txt.
    READ TABLE git_objtxt INTO gwa_objtxt INDEX lfd_lines_txt.
    IF sy-subrc IS INITIAL.
      gwa_doc_chng-doc_size = ( lfd_lines_txt - 1 ) * 255 + STRLEN( gwa_objtxt ).
    ENDIF.
*Main Text
    CLEAR gwa_objpack.
    gwa_objpack-transf_bin = ' '.
    gwa_objpack-head_start = 1.
    gwa_objpack-head_num = 0.
    gwa_objpack-body_start = 1.
    gwa_objpack-body_num = lfd_lines_txt.
    gwa_objpack-doc_type = 'RAW'.
    APPEND gwa_objpack TO git_objpack.
    CLEAR gwa_objpack.
*Attachment(PDF Attachment)
    gwa_objpack-transf_bin = 'X'.
    gwa_objpack-head_start = 1.
    gwa_objpack-head_num = 1.
    gwa_objpack-body_start = 1.
    DESCRIBE TABLE git_objbin LINES lfd_lines_bin.
    READ TABLE git_objbin INTO gwa_objbin INDEX lfd_lines_bin.
    IF lfd_lines_bin > 0.
      gwa_objpack-doc_size = lfd_lines_bin * 255.
      gwa_objpack-body_num = lfd_lines_bin.
    ENDIF.
    gwa_objpack-doc_type = 'PDF'.
    gwa_objpack-obj_name = 'Project ID'.
    gwa_objpack-obj_descr = 'Project_ID.PDF'.
    APPEND gwa_objpack TO git_objpack.
    CLEAR gwa_objpack.
    READ TABLE git_usr21 INTO gwa_usr21
            WITH KEY bname = lwa_usr_spool-bname
                      BINARY SEARCH.
    IF sy-subrc IS INITIAL.
      READ TABLE git_adr6 INTO gwa_adr6
            WITH KEY addrnumber = gwa_usr21-addrnumber
                     persnumber = gwa_usr21-persnumber
                     BINARY SEARCH.
      IF sy-subrc IS INITIAL.
        gwa_reclist-receiver = gwa_adr6-smtp_addr.
        gwa_reclist-rec_type = 'U'.
        gwa_reclist-com_type = 'INT'.
        APPEND gwa_reclist TO git_reclist.
        CLEAR gwa_reclist.
      ENDIF.
    ENDIF.
    IF NOT git_reclist[] IS INITIAL.
*SAPoffice: Send new document with attachments using RFC
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gwa_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        IMPORTING
          new_object_id              = lwa_obj_id
        TABLES
          packing_list               = git_objpack
          contents_bin               = git_objbin
          contents_txt               = git_objtxt
          receivers                  = git_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.
         REFRESH: git_objpack, git_objbin, git_objtxt, git_reclist,
             lit_pdf.
         CLEAR: gwa_doc_chng, lfd_buffer.
  ENDIF.
Any help to resolve the Issue ?
Regards,
Ramesh Manoharan
Edited by: ramesh.manoharan on Apr 7, 2010 12:39 PM

Similar Messages

  • Reg: Error in Mail sending through background job in SCOT

    Hello experts,
    I am trying to schedule a background job through SCOT so as to send the mails present in SOST.
    The job is running but it is giving error as "Invalid status  for recipient" in SOST.
    But when I am sending it directly from SOST it is delivered without any errors. The email address is maintained correctly and SMTP settings are also correct as while sending it directly from SOST it reaches the required recipient without any error.
    This error is observed only through background job. I am using program RSCONN01 with variant SAP&CONNECTINT in background job.
    Kindly suggest why I am getting the error "Invalid status  for recipient" in background job.
    Thanks & Regards
    Meraz
    +91 8894522860

    I am getting the exact same issue.
    were you able to fix this in the last 3 weeks?
    thanks.

  • Reg : Creation of Transparent table in background

    Hi Experts,
       Whether is it advisable to use 'CL_REBF_DDIC_TABL'  to create a transparent table.
        I have used PUT_COMPLETE in this class to create the table, I am able to create it.
        This method has a import parameter 'ID_MSGLIST', I am not getting what need to be passed for this parameter.
        I have simply passed some number (eg: 123)  for testing, so inside this class if any sy-subrc check fails it is giving
        dump. If sy-subrc is equal to 0 then the table is created successfully.
    Regard's,
    Jean.

    Following are the steps to assign table to a transport request.
    1. Create Transport Request in SE09.
    2. Double click the Request and Go to Objects Tab.
    3. Create an entry with PROGRAM ID = 'R3TR', Object Type = 'TABL', Object Name = <You Table Name>.
    Move the transport request to from one system to another.

  • Reg usage of XSLT Mapping

    Hi All,
    We need to build an interface from PI to some database using JDBC adapter to send out emails to business users of the exception records created in the table.please help in using the xslt mapping for this interface.
    Thanks in Advance,

    Hi,
    You can build your scenario as follows:
    1) If the emails have to be sent from PI then you need to get back a response from the database.....if this is failure message then initiate your send email process...the whole process can be implemented using a BPM: Source ---> PI ---> JDBC --->PI ---> Email
    2) You need to use a receiver mail adapter to send emails
    3) Refer this blog of michal in which it is mentioned how to use the XSLT mapping and configuration for sending the emails:
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    You can also refer: http://www.riyaz.net/blog/xipi-sending-emails-using-xi-mail-adapter/
    For more clarification you can also refer my answer in this thread:
    Re: xml in mail
    The XSLT mapping that you need will be only in the PI ---> Email scenario...
    Make sure that you download the desired email structure from service market place before you start with the scenario.......do let me know if my answer helps.
    Regards,
    Abhishek.

  • Reg:usage of 7.1v NWDS

    Hi experts
    i am working now on 7.1v NWDS .But when i try to deploy it is giving below error.
    error :Firefox can't establish a connection to the server at h2syss.vctl.ad.
    More Over i have specified the properties under window->preferences->SAP AS JAVA .
    But when i have given instance name and instance No .Register Sap System.
    In the table column it is giving two instance host and no.
    that is h2syss 1
              h2syss.vctl.ad 0.
    can any one help me out.
    How to resolve this issue.
    Thanks & Regards
    Deepika

    Hi Deepika,
    The possible error are :
    1. The user id and password you are using may not have deploying rights.
    2. The Network might be fluctuating one.
    3. The Instance could have changed ie the server would have restarted and port could have changed.
    It is always suggested that to add server instance just before you deploy and after the server has taken a restart.
    Regards
    Piyas Kumar Das

  • Reg. usage of BAPI_DOCUMENT_GETOBJECTDOCS

    Dear Experts,
    My requirement is that i need to pass OBJECTTYPE as 'MARA' if it is Material BOM and OBJECTKEY as material no.
    and OBJECTTYPE as 'STPO_DOC' if it is BOM item and OBJECTKEY as GUIDX using in BOM Comparison to fetch Document Info Record attached to it. Can anyone explain me with sample code?
    Thanks,
    Ramesh Manoharan

    Hi Raj,
    Thanks for your immediate reply. But the link sent by you did not help me. I need to understand Material BOM and BOM item and also pass OBJECTTYPE as 'STPO_DOC' if it is BOM item and OBJECTTYPE as 'MARA' if it is Material BOM. How do i differentiate between Material BOM and BOM item?
    Thanks,
    Ramesh Manoharan

  • REG: Usage of PGP(pretty good privacy) encryption

    Hi all,
                 I need to use PGP encryption in XI. Can u suggest is it possible or not. If yes can you tell me how can it be done.

    hi,
    PGP Encryption is used to support the transmission of sensitive data to / from third party systems via XI.
    Adapter modules are developed to encrypt the file using PGP.
    We had a similar requirement where we used PGP encryption.The module was developed using Cryptix OpenPGP which is a Java implementation of the OpenPGP standard.When the module is called in the adapter, it uses the PGP key provided by the party that will receive the encrypted message. This module should be called prior to calling the Sap adapter
    Logic Flow/Processing:
    1.Read the XML payload and message for getting the needed data.
    2.Read the key to be used in the encryption and log the key to be used and the beginning of the encryption.
    3.Call the PGP encryption and compression method.
    4.Log whether encryption has been successful.
    5.Set as payload the message content encrypted, and the principal data.
    6.If any error occurs, logs an exception in PGP adapter module and the error reason.
    7.Return the message.
    regards
    kummari

  • Reg usage of break point in debug mode

    Dear experts,
       I want to know how to go to a particular line in debugging mode. Suppose for example, if a program contains main program and includes.  I want to go to a particular line in debugging mode in the includes. How can i go? kindly help me.
    tks

    Hi Prabhakar,
    Using break points you can stop the execution control at that break point.
    If you use only F5, F6, F7 for debugging you don't need of break points.
    But if you want to stop at particular statement while running the report (using F8) you should use Break Point. Ofcourse you can use watchpoints also.
    Watchpoint --- If you put watch point execution control stops at the particular statement when the value of watchpoint is reached.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.

  • Reg Usage of Index

    Hi PPL,
    Can anybody tell me how to use the database table Indexes in the programs?
    Regards,
    Kevin Nick.

    Hi...
    just see these links......
    Re: select statement : Secondary index 
    how to use secondary index
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eb2d446011d189700000e8322d00/content.htm
    http://www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
    SELECT QUERY  BASED ON SECONDARY INDEX
    Reward points if useful,,,,,,
    Suresh......

  • Reg Usage of ODS Table in Transformation

    Hai All,
                I am new to SAP NetWeaver BI. Can i use the ODS Table in the transformation rules ?
    Is this the right approach  or not ? My requirement is i have  to poulate some infomration into new ODS depending on the data which is available in othere ods table.
    Regards
    Prashanth

    Hi Prashant,
    Please refer to the sources below to understand Transformations...
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/EN/e3/e60138fede083de10000009b38f8cf/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/EN/e3/e60138fede083de10000009b38f8cf/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/EN/e3/e60138fede083de10000009b38f8cf/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/EN/e3/e60138fede083de10000009b38f8cf/frameset.htm</a>
    Also refer to this white paper in SDN on Transformations
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19">https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19</a>
    To ensure good performance, use the Start or End Routine to execute such lookups on DSO tables.
    Regards,
    Shrikant

  • Reg usage of HttpS

    is it okay to use Https://localhost as parameter in URL class insted of using a HttpSURLConnection will both work in the same manner if not how to use HttpsURLConnection class?
    thanks in advance

    Hi Chandra Shekar,
    standard text with variable
    SO10 doubt : standard Text
    Regards,
    Sravanthi

  • Reg:usage of table in popup window

    hi all
    i am using pop up window for opening very functionality of a button .but when i am using table ui element with type as input fields inside a pop up .when i click on button( details) this pop up is opening  with table ui element but in this table as i want to enter experience details of an employee in this table at run time is my scenario.here the problem is this table though it is in the  edit mode first row  , it not allowing to enter the values in it.(cardinality i have changed to 1:n).
    2)how to make all the rows of a table into input fields even though i have taken them as a input fields it showing in display mode .
    can any one share ur  knowledge on this
    regards
    Deepika

    Hi,
    Are you using normal table UI element or ALV.
    If you are using the normal table, check the READ_ONLY property should be unchecked for TABLE property.
    Also check at the INPUT edtior level.
    Regards,
    Lekha.

  • Reg:usage of radio buttons

    Hi all
    where i need to display fields depending on selection of radio button.
    i am using three radio buttons when i select first radio button i need to display one view with some fields and  when i select sec it need to display different fields in the secview page ,can any one guide me how to reslove this task
    Thanks in advance
    Deepika
    Edited by: deepika_indian on Feb 12, 2011 1:20 PM

    Hi Deepika,
    1.Create 3 seperate views, create 3 transparent containers and create ViewUIelement container in every view and place it in TC.
    2 create a Action for click of ur radio button , in the OnAction property of ur radio button , switch to the next view
    for navigation , u do like this :
    1 Outbound Plug: Define outbound in ur initial view , tosec for ur 2nd view, to 3rd like that.
    2 create Inbound plug for ur destination views , suppose , fromfirst, form sec
    3 now in OnActionMethod of ur radio , based on your condition fire the plug
    wd_this->fire_tosec_plg( ) .
    Hope it might helps you...
    Thanks,
    Kris.
    Edited by: kissnas on Feb 14, 2011 6:19 AM

  • Reg : usage of standard Texts(SO10)

    Hi all of u,
      I want to use standard texts ,which were created under Tcode SO10, alone to display output without using them in any of the script or smartforms.Also i want to nw that , is it possible to use Variables inside standard text,which r really exist in report,report is through which i want to make use of ths Texts .The variable are / shuld be  local to this program...
    Kindly guide me ....
    This will simplifies my work ...
    Thanks in advance,
    Regards,
    Chandra.V

    Hi Chandra Shekar,
    standard text with variable
    SO10 doubt : standard Text
    Regards,
    Sravanthi

  • ECATT:To run the test configuration in the background,

    Hi All,
    Can anyone guide me on , how i can run the ECATT Test script in background i.e. as background job.
    My test script is running successfully in foreground and the usage of running it in background is mass upload of data.
    Regards
    Edited by: Shweta gupta on Jan 24, 2008 9:48 AM

    username: portal
    password: <same as ias_admin>
    AS next step, you can disable Reports using SSO, or you can create other users (within SSO) with access to Reports so that they don't have to login as portal-user.
    Regards,
    Martin Malmstrom

Maybe you are looking for

  • How to I get passwords going in to my new password sofware

    How to I get passwords going in to my new password sofware?

  • Duplicate Item Name

    Hello all, I have a widget in Captivate 5.0 that pulls in an image based on the name of the slide.  The widget is named according to a convention i created.  W_02_0004_02 This would signify (Module 02 - Slide 0004 - Image 02) I had incorrectly labele

  • Attributes in Oracle Lockbox

    Hi All, I need to capture some additional infomation relating to receipts applications( overflow records ) in Oracle Lockbox. Please let me know if it is possible to capture these infomation through attributes in the ar_payments_interface_all. Becaus

  • PE 4 insert

    Can you insert a pointer (arrow) in PE 4?  I would like to call attention to something specific with an arrow.  Thank you.

  • FYI:142840-03  WITHDRAWN PATCH Logical Domains (LDoms) Manager 1.2 ldmd

    If you're in a patching mood this time of the year it's worth noting that the ldmd patch has been withdrawn: [142840-03|http://sunsolve.sun.com/search/document.do?assetkey=1-21-142840-03-1] WITHDRAWN PATCH Logical Domains (LDoms) Manager 1.2 ldmd pat