BAPI or FM to retrieve invoice Work item attachment

Hi Folks, is ther any FM or BAPI to extract the link of attachment using workitem ID of Invoice WF.
Regards
TGB

Closed. Got the answer by self.

Similar Messages

  • Smartform as work item attachment

    Hi,
    I would like to have a smartform as an attachment in the work item. This is as part of User Decision step.
    I had gone through one of the blogs  by Ramakanth Reddy of creating attachment to work item but there was no clear description of SOFM object and what needs to be done to configure the same. Also it was a Adobe form...I need details as to how a smartform needs to be attached.
    Could you help me out as to how to attach a smartform as an attachment in the work item.
    There is a Z report in which the code to generate the smartform is written. I need to know how I can use this smartform as a work item attachment.
    Thanks in advance for all the help.

    Hi,
    I have checked the same and everything seems to be in order.
    Lemme explain what I have done and maybe u mite throw some light on it.
    I have created a new task. In this task I have called the report program that generates the smartform.
    Submit Z_tr_form with pernr = object-key-employeenum
                                         reinr  = object-key-tripnumber
                                and return.
    Inside this report, I have done the following :
    IMPORTING
          document_output_info = st_document_output_info
          job_output_info      = gt_otfdata
    i_otf[] = gt_otfdata-otfdata[].
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = v_len_in
            bin_file              = v_file
          TABLES
            otf                   = i_otf
            lines                 = i_tline
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            OTHERS                = 4.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = v_file
    *     APPEND_TO_TABLE       = ' '
       IMPORTING
         OUTPUT_LENGTH         = ZVAR1
        TABLES
          BINARY_TAB            = it_solix_tab
    if sy-subrc = 0 and not it_solix_tab[] is initial.
                swc_set_table container 'IT_SOLIX_TAB' IT_SOLIX_TAB.
                swc_set_element container 'ZVAR1' zvar1.
                swc_set_element container 'ZTR_MGNT' obj.
                export ZVAR1 to memory id 'ZVAR'.
    CALL FUNCTION 'SWW_WI_START_SIMPLE'
        EXPORTING
    TASK                               = 'WS12500022'
    TABLES
          AGENTS                             = it_agents
    WI_CONTAINER                       = container
    Now after the submit statement I am importing the value  of ZVAR1.
    swc_get_table container 'IT_SOLIX_TAB' IT_SOLIX_TAB.
    swc_get_element container 'WORKITEMID' WORKITEMID.
    swc_get_element container 'ZVAR1' ZVAR1.
    CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
    EXPORTING
    INPUT_LENGTH       = ZVAR1
    IMPORTING
    BUFFER             = ZXSTRING
    TABLES
    BINARY_TAB         = IT_SOLIX_TAB.
    ZSWR_ATT_HEADER-FILE_TYPE = 'B'.
    ZSWR_ATT_HEADER-FILE_NAME = 'TRIPDET'.
    ZSWR_ATT_HEADER-FILE_EXTENSION = 'PDF'.
    ZSWR_ATT_HEADER-LANGUAGE = 'EN'.
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
    EXPORTING
    WORKITEM_ID          = WORKITEMID
    ATT_HEADER           = ZSWR_ATT_HEADER
    ATT_BIN              = ZXSTRING
    IMPORTING
    ATT_ID               = ZSWR_ATT_ID
    swc_create_object lwa_bo_sofm 'SOFM' zswr_att_id-doc_id.
    swc_set_element container 'SOFM' lwa_bo_sofm.
    After this step in the workflow we have the User Decision. The binding from the WF container to the User decision as mentioned in Ramakanth's article has also been done.
    I am not able to see the PDF output in the container also.
    I have a question.....in the article that Ramakanth had given, the report program to generate the adobe form was run separately. In my case I am calling the same inside the task. Is that causing a hinderance as such....I am not able to figure out as to why I am unable to get the attachment.
    Lemme know ur comments.
    Thanks in advance for all the help.
    All the bindings are also in place. I checked with the document that Ramakanth had written and checked all the bindings

  • Retrieving approval work item comments

    Does anyone know how you retreive the comments inserted by approvers against approvals, so they can be used in workflows? This is a text area with a fieldref name of Log Comments with an inner field name of :variables.comments. I have tried to grab this value of :variables.comments in a hidden field in the Work Item List Form without success and just cannot figure out how to retreive it.

    Hi, I have the same problem.
    If you log into the IDM admin interface
    and look under the WorkItems->Approvals tab,
    the out-of-the-box approvals process
    presents a text-area where an approver
    can add comments.
    How do you capture the comments so you can use it,
    for example, in the body of an email?
    Thanks,
    John I

  • Invalid URL error when displaying Work Item Attached URL Object in UWL

    Hi,
    After upgraded from EP6 to EP7 the user can no longer display the attached URL object of work items in the UWL Inbox.  It works fine in the SAPGUI Inbox so the URL should be okay.  We found below error messages in UWL log file:
    #1.5#0003BA5D298B001E0000030300003A280004314BFE992222#1180102370599#/uwl/ui#sap.com/tcwddispwda#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#C004049#43497#####SAPEngine_Application_Thread[impl:3]_0##0#0#Warning#1#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#Plain###com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=HTTP://apinvoice.d51.lilly.com
    gbip
    gbip.asp?po=invoice=TC630400360USERID=USC076601#
    #1.5#0003BA5D298B001E0000030400003A280004314BFE9986AB#1180102370625#/uwl/ui#sap.com/tcwddispwda#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#C004049#43497#####SAPEngine_Application_Thread[impl:3]_0##0#0#Warning#1#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#Plain###com.sap.netweaver.bc.uwl.UWLException: Fri May 25 10:12:50 EDT 2007
    (Portal) :com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException:Invalid URL=HTTP://apinvoice.d51.lilly.com
    gbip
    gbip.asp?po=invoice=TC630400360USERID=USC076601#
    Looks like the error is related to the back slashes in the URL but it was working fine in EP6.  We are going to change the back slashes to forward slashes to see it will work.  We would like to know if any SDNer’s can provide some more detail on why this is happening and if there is other solution.  Any hint will be very appreciated.
    Regards,
    Jiannan Che

    Use link attachment or add button action to UWL as possible workaround. It appears that work item text can only be displayed as-is.

  • Work Item Attachment

    Hi Guru's
    I need to attach a Pdf file to work item.
    Actually I have wrritten a code for converting the Smartform into PDF format but now i need to send this as a mail with workitem attachment.
    for this we need Use SOFM Object but i'm not having clear idea about the sequence process.
    <removed by moderator>
    Please help me to do this
    Advance Thanks
    Edited by: Mike Pokraka on Jul 24, 2008 11:04 AM

    hi maruli
    use this link
    Link:[http://help.sap.com/saphelp_nw70/helpdata/EN/d3/bde438b572b407e10000000a114084/frameset.htm]

  • RSWUWFML2 - Work item attachment issue

    Dear Friends,
      I have used RSWUWFML2 to send notifications to outlook when a new workitem comes to user's SAP Inbox. The notification is working fine but when the user clicks the attachment in outlook to open the workitem  the SAP GUI is opening in a small window(minimized state). I want that to open in a maximized state. Please let me know if need to do any settings.
    I tried to open the same attachment from SOST but there also it is opening in minimized state.

    I debugged the report RSWUWFML2 and found that  the parameter   i_windowsize passed to the function module swn_create_shortcut is hard coded  "Normal Window". Probably I have to created a custom version of this report to change this parameter to "Maximized".

  • Word Document as Work Item Attachment

    HI All
         Can any body help me , how to pass a word document as attachment to a workitem (Activity Step)
    Thanks in Advance
    Pavan

    Purvesh Thank you  very much for giving me the alternative solution but, can you say me how can i programatically pass the attachment to the workflow
    may be from ABAP to Wrokflow conatiner element (&_ATTACH_OBJECT&)

  • BAPI / Function Module to Retrieve AR Customer Invoices like FB03

    I’m writing some code to post and retrieve AR Customer Invoices.  It looks like BAPI_ACC_DOCUMENT_POST is the way to create the invoice (any way to park it?) but I’ve only found BAPI_AR_ACC_GETOPENITEMS to retrieve invoice data which does not seem like what I really want.  I do want line item details but only for the invoice I’m after and it may not be open any longer.  T-code FB03 is the GUI way.  How do I get the invoice data throug a remote enabled BAPI or FM?
    Thanks for any help,
    Karl

    BAPI_INCOMINGINVOICE_CREATE Invoice Verification: Post Invoice
    After the CALL of BAPI_ACC_INVOICE_RECEIPT_POST is finsihed and there are no errors, you have to call 'BAPI_TRANSACTION_COMMIT' to commit the invoice.
    BAPI_ACC_DOCUMENT_POST
    Please give me reward points if it is useful...

  • Error while opening work item in Inbox sbwp for verifcaion of right invoice

    Hi,
    I am working on SAP workflow with IXOS.
    I faced  a problem in opening the workitem when it came into the inbox.
    In nomal scenario when i click on the workitem under workflow folder in my inbox, it opens the attached document in document viewer, i can see the attached document ,and after verifying it ,i can furher process it.
    But now when i click on the work item in my inbox it directly takes me to the next processing window, without opening the attached document for my verification, so i am unable to check that i am processing the right invoice.
    Please help.

    Yes, it was working fine before.
    And also the problem generally rise in afternoon.

  • Disable Reject Button for Invoice on Work Item Screen

    Hi! I know we can use the Dynamic Column configuration to disable and enable the Approve/Reject button on the Inbox screen where the approval work items are displayed. However, I would like to know whether it is possible to have only the Reject button disabled? Reason for asking this is a rejection reason needs to be maintained for the rejection. The check is in place if we reject the invoice from the detail screen. However, if we reject it from the Inbox screen, it will go through without any warning or error message. I have searched OSS notes but found nothing so am wondering whether this can be considered a bug or not. If not, then I want to know what solution option I have relating to this. I am thinking of either a repair to disable the button on the screen for invoice approval or find a why with the dynamic columns to do that.
    Appreciate any comments on the above.
    Cheers!
    SF

    No response

  • Insert/Update/Delete Non-PO Invoice Line Item via FM/BAPI?

    Does anyone know of a way to insert/update/delete an Invoice Line item (Non-PO Accounting Invoice - Transaction FB60 or FV60) using a BAPI or Function Module (or set of function modules) using ABAP? I have been trying to find some code to accomplish this and am stuck on a couple of issues.
    I have found PRELIMINARY_POSTING_FB01 and PP_CHANGE_DOCUMENT_ENJ but both seem to submit the details to background processes. This is an issue because it gives the user a success message after execution but later delivers the error to Workflow. This is for an interfacing program so the results should be as real time as possible.
    Has anyone accomplished this via FM or BAPI and if so would you mind sharing your experiences?
    Thank you very much,
    Andy

    SG- Thank you for the reply.
    I have been playing with BAPI_INCOMINGINVOICE_PARK and I'm not sure if it is doing exactly what we want, but it is something that I have considered in the past. I plan on looking into BAPI_ACC_INVOICE_RECEIPT_POST this morning, hopefully that will provide some more for us.
    If possible I'd like to avoid BDC sessions because this program could hypothetically interface with multiple SAP systems with different configurations.
    I will check into those FM's and thank you very much.

  • Work items are not dis appearing in my inbox for parked FI invoices.

    Hi,
    work items are not dis appearing in my inbox for parked FI invoices.
    We are using asynchronus method, and terminating event for this method.
    Could you please suggest, what will be the reason for this.
    Thanks & Regards
    Madhu

    Hi Karri,
    Thank you for your response.
    But the event is triggering, No error message is getting.
    Any other idea about the issue.
    Thanks & Regards
    Madhu

  • Invoice Workflow : Dialog work item created

    Hi,
    I am not fully aware of workflow but can manage to check the logs and status.
    My question is: My Invoice workflow status is 'READY' but i dont know how to find to whom the work item it currently held.
    When i check the log it says:
    WF-BATCH                       Dialog work item created
    How can i check, which approver currently held work item so that i can chase them to approve the item.
    There are no agents assigned to the workflow and it is General Task.
    I would apprecaite if you could share me some information about this.
    Thanks,
    Macs.

    Hi,
    About Invoice Workflow :
    WS10400016 – Without approval,
    WS10400017 – One-step approval,
    WS10400018 – Two-step approval,
    WS10400021 – Administrator approval
    The relevant approval workflow is started, depending on completion status, invoice category (credit memo or invoice), creator role, and total value of the invoice.
    You should have maintained approver in your org structure (PPOMA_BBP)
    Please have a look at  :
    http://help.sap.com/saphelp_srm50/helpdata/en/58/c14e3c59bfe747e10000000a11402f/frameset.htm
    Kind regards,
    Yann

  • BAPI for Vendor Non-PO Invoice processed through MIR7 Transaction

    Hi All,
    I have a requirement where i will get data from flat file. Using this data Vendor Non-PO Invoice
    will be processed through MIR7 transaction with Multiple line items - Invoice Upload Parking the document for vendor non-po invoices.
    The data is in below format in flat file:
    Header fields in 1st line
    Dr. Key related fields in 2nd line
    Cr. Key related fields in 3rd line
    Header fields in 4th line
    Dr. Key related fields in 5th line
    Cr. Key related fields in 6th line
    etc .... in flat file
    In these main fields coming in from flat file are: comp.code, doc.type, vendor no,
    Debit/Credit indicatorSHKZG, G/L a/c no, inv/post dates etc..
    My issues:
    1. I am planning to use F.M BAPI_INCOMINGINVOICE_PARK is it the correct F.M!
    But Here PO number seems to be mandatory for this F.M but it is not available as per our flat file,
    if so can anybody suggest a BAPI for Vendor Non-PO Invoice parking for MIR7 transaction!
    2. What are the parameters need to be used for from above flat file data especially for 2 line itemshttp://Dr./Cr. data other than header data. So as per Header & 2 Line items http://Dr. & Cr. Data which parameters will be updated with which data in above flat file! can anybody clarify!
    3. Also in flat file WorkflowNo is available in which parameter this fields will need to be filled & also by doing this will it trigger workflow automatically!
    Can anybody clarify about above points!
    Thanks in advance.
    Thanks,
    Deep.

    Hello Deep,
    I know it might be quite late for you for this answer, nevertheless I will write that, because there are lots of question like yours. bapi_incominginvoice_park is also a suitable bapi for you. All you need to do is call it this way:
    data: headerdata like bapi_incinv_create_header value is initial,
            table_item type table of bapi_incinv_create_item,
            gl_account like bapi_incinv_create_gl_account,
            table_gl type table of bapi_incinv_create_gl_account.
    * fill headerdata and table_gl, leaving table_item empty
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
        EXPORTING
          HEADERDATA                = HEADERDATA
    *   ADDRESSDATA               =
        IMPORTING
          INVOICEDOCNUMBER          = lv_docnr
          FISCALYEAR                = lv_year
        TABLES
          ITEMDATA                  = table_item
    *      ACCOUNTINGDATA            = table_acc
          GLACCOUNTDATA             = table_gl
    *   MATERIALDATA              =
    *      TAXDATA                   = table_tax
    *   WITHTAXDATA               =
    *   VENDORITEMSPLITDATA       =
          RETURN                    = lt_return.
    This works perfectly for me, creating a mir7 document without refering to a PO. The trick here is to fulfill the glaccountingdata importing table while leaving itemdata empty.

  • Relation between Invoice Line items and Accounting Line item

    Dear All,
    My requirement is to print all the invoice documents and it's tax values like cenvat, Ecess, BED and VAT.
    I have to fetch these tax details from BSEG table .
    I' am getting Invoice number ( RBKP-BELNR ) from BKPF-AWTKEY .
    Can any one please tell me how to relate the Invoice line items and Accounting document line items..
    Any BAPI or FM is there to retrieve these data.
    Please do needful in this regard.

    Hi,
    from table bseg - field Koart
    K = Vendor
    D = Customer
    S = G/L account here tax lines identify with buzid = T
    or take table bset for taxes
    Andreas

Maybe you are looking for

  • DUMP while running my import FM

    Hi ALL, I have import request and i got sucess .My 3 function modules are import to client system.2 FM are working properly but 1 function module is going for DUMP. I have gone dump analysis its saying An exception occurred. This exception is dealt w

  • Silent print pdf using advanced settings

    I have written a program in vb.net and need to be able to print pdf's from wiyhin the program using the Print Dialogue Presets Ie Page Scaling, DuplexMode and Paper Source by Page Size as set in the Advanced Properties of the pdf file. Ideally this w

  • How do I make a button take me to a web site?

    I have an applet, and I want to make it so that when I press a button it takes me to another URL. Please give me the code.

  • Mac Mini won't turn over

    Hi folks, A mac mini in my household won't turn over. It gets to the grey Apple screen with the spinning search circle, but stays that way. The strange behaviour began after I installed the latest security and safari update via Software Update. I tri

  • Safari upgrade will not give access to plug ins

    I did the most recent upgrade to safari, I play a couple facebook games and they all work except one.  It will not load the page since the upgrade.  I can not find "global settings" in my adobe flash to change any settings.  not sure what I am doing