How to retrive the attachment at the header level attached in a PO

Hello,
    my requirement is to read the attachment at the header level from a PO and send the attachment as an email.Can help me n tell how to read the attachment and send it via a email.
Plz reply ASAP

Get The data from EKKO table to get all header Level  and send an email to particat user group.
Table Declarations
TABLES: SOLI.
Data Declarations
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: SAPID RADIOBUTTON GROUP ADDR,
EMAIL_ID RADIOBUTTON GROUP ADDR.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: ID FOR SOLI-LINE NO INTERVALS.
SELECT-OPTIONS: CC FOR SOLI-LINE NO INTERVALS.
SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
*PARAMETERS: SENDER LIKE SOUD-USRNAM.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
PARAMETERS: SUB_LINE(60) TYPE C.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
SELECT-OPTIONS: TEXT1 FOR SOLI-LINE NO INTERVALS.
SELECTION-SCREEN END OF BLOCK B4.
SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT-009.
SELECTION-SCREEN BEGIN OF LINE.
parameters: P_ATTACH as checkbox.
selection-screen comment 3(30) text-010.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B5.
DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
SUBJECT_LINE LIKE SOOD1-OBJDES.
Start of program processing
START-OF-SELECTION.
Get the Body of the Message from the selection screen or from
calling program
LOOP AT TEXT1.
MOVE TEXT1-LOW TO MAIL_CONTENT-LINE.
APPEND MAIL_CONTENT.
ENDLOOP.
Subject of the Message
MOVE SUB_LINE TO SUBJECT_LINE.
call a routine to send the workflow message
PERFORM SEND_EMAIL
TABLES MAIL_CONTENT
USING SUBJECT_LINE.
*& Form SEND_EMAIL
Send Workflow message
FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
USING TITLE LIKE SOOD-OBJDES.
DATA: RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
TSOOD1 LIKE SOOD1,
PACKING_LIST LIKE SOXPL OCCURS 0 WITH HEADER LINE,
OBJCONT1 LIKE MAIL_CONTENT OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF AT_HEADER OCCURS 1.
INCLUDE STRUCTURE SOLI.
DATA: END OF AT_HEADER.
CLEAR: TSOOD1,
RECEIVERS.
REFRESH RECEIVERS.
MOVE: SY-LANGU TO TSOOD1-OBJLA,
'Email Notice' TO TSOOD1-OBJNAM,
'C' TO TSOOD1-OBJSNS,
TITLE TO TSOOD1-OBJDES.
'SCHIAVONIR' TO TSOOD1-OWNNAM.
loop through each ID and move them to recipient table
LOOP AT ID.
TRANSLATE ID-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
ID-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
ID-LOW TO RECEIVERS-RECEXTNAM.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
loop through each CC and move them to recipient table
LOOP AT CC.
TRANSLATE CC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
CC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDCP.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
CC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDCP.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
loop through each BCC and move them to recipient table
LOOP AT BCC.
TRANSLATE BCC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
BCC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDBC.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
BCC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDBC.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
AT_HEADER = SY-DATUM.
APPEND AT_HEADER.
AT_HEADER = SY-UZEIT.
APPEND AT_HEADER.
IF SENDER EQ SPACE.
SENDER = SY-UNAME.
ENDIF.
IF P_ATTACH EQ 'X'.
PACKING_LIST-HEAD_START = 1.
PACKING_LIST-HEAD_NUM = 2.
PACKING_LIST-BODY_START = 1.
PACKING_LIST-BODY_NUM = 9999.
PACKING_LIST-FILE_EXT = 'TXT'.
APPEND PACKING_LIST.
CLEAR PACKING_LIST.
APPEND LINES OF OBJCONT TO OBJCONT1.
REFRESH OBJCONT.
ENDIF.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
OBJECT_HD_CHANGE = TSOOD1
OBJECT_TYPE = 'RAW'
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
ATT_HEAD = AT_HEADER
ATT_CONT = OBJCONT1
PACKING_LIST = PACKING_LIST
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
ENDFORM. " SEND_EMAIL
Reward Points if it is helpful
Thanks
Seshu

Similar Messages

  • How do i pass the error message at header level in CRMD_order

    Hi all,
    i got one requirement like when i create/change the sevice order (CRMD_ORDER)
    if net_value is more than 1000 i have to set the message 'E' like 'order is blocked'
    else 'approved' at header level before going to save the order.
    please help me out it is high priority and as i am new to CRM.
    thanks in advance.
    Thank you,
    Madhu.

    Anil
         You have to look for a BADI to add the Error Message.
          Also use the FM CRM_MESSAGES_DISPLAY to display the message !
    Thanks
    <b>Allot points if this helps!</b>

  • Change the Payment Method at header level in Sales order document.

    Hi Experts,
    I have a doubt and a problem; I want to change the Payment Method at the header level however that is not possible never at header level is the same even either I chose other when I was creating the sales order document or I tried to change after that. The system allows changing the Payment Method but when I display the document after that the change is not done always is the same payment method. Maybe it is defined at customer or sales organization level.
    At item level it is possible change the payment method with any problem.
    Thank you and best regards.

    Dear Alberto
    Payment Terms can be changed both at header level and at item level in sale order.
    thanks
    G. Lakshmipathi

  • ECC PR's header level attachment transfer

    Dear Experts,
    We are on SRM 7.0 SP10 , currently using ECS with PDP scenario and for transfer of PR's using BBP_EXTREQ_TRANSFER report. However found issue with the header level attachments transfer's since Purchase requistions have Header but not Shopping carts. Thus request your advice on how to address this issue even it is by a code change or enhancement.
    Thanks and Regards,
    Venkata Koppisetti.

    Dear Ivy,
    Thanks for the input.
    I already maintained the above setting and my XML contains the Attachement folder with below information,
    The XML contains the Attachement folder with following information,
    - <AttachmentFolder actionCode="04">
    - <Document actionCode="04">
      <PathName>C:\Users\XXXX\Desktop\1pr.xls</PathName>
      <Name>1pr.xls</Name>
      <VersionID>00</VersionID>
    - <SystemAdministrativeData>
      <CreationDateTime>2014-10-21T07:45:22Z</CreationDateTime>
      </SystemAdministrativeData>
      <VisibleIndicator>true</VisibleIndicator>
      <VersioningEnabledIndicator>true</VersioningEnabledIndicator>
      <CategoryCode>3</CategoryCode>
      <TypeCode>ZPR</TypeCode>
      <MIMECode>application/vnd.ms-excel</MIMECode>
      <Description languageCode="en" />
      <FileContentBinaryObject mimeCode="application/vnd.ms-excel" uri="C:\Users\XXXX\Desktop\1pr.xls" />
      </Document>
      </AttachmentFolder>
    The SC is created but the attachement is not added in the SC item. Any customization for this need to be maintained in SAP SRM system??
    Kindly advice it.

  • How to delete approved shopping carts at header level in SRM 5 ?

    Hi All
    We are using SRM 5 (Classic Scenario) and we have a requirement in which we need to delete the approved shopping carts at header level. Here we are referring the case where SC lies in approved state in SRM but no PO generated in back end.
    We assume that if PO has been created for SC then shopping cart can not be deleted at all.
    I have seen advices like deleting approved shopping carts at item level but this would not suffice. As well we have seen that if we delete the SC at item level still SC shows complete value in header.
    Please advise on this.
    Regards
    Pranay Gupta
    +919711120111

    Hello,
    As far as I know, cart can be deleted at header level when its status is held.
    You can try to archive your carts, since item can be deleted.
    Check the archiving criteria here:
    http://help.sap.com/saphelp_srm50/helpdata/en/3c/f8f03bb8e88109e10000000a11402f/frameset.htm
    And shopping cart archiving procedure here:
    http://wiki.sdn.sap.com/wiki/display/SRM/ShoppingCartArchiving
    Regards,
    Ricardo

  • How to retrive original version of the Web Query in BW ?

    Hello Friends ,
    I have transported one Web report from BW development to BW Production System.
    But unfortunately , the desired result not me met .
    So I have been asked to keep the original version of the Web report.
    As the new version of Web report has replaced the previous one ,
    So could anybody tell me how to get the original version of Web report in BW ?
    Many thanks in advance !!!!!!!!

    Hi,
    Hi,
    You can use the Transaction STMS choose the option "Import Overview" . In the GOTO tab select "History" and choose "Import History".
    Here you can find the history of requests imported to the prod system.
    Regards,
    K.Manikandan.

  • BAPI_SALESORDER_SIMULATE How to get the conditions on header level?

    Hi,
    is it possible to get the pricing conditions on header level (sales order) with the Bapi BAPI_SALESORDER_SIMULATE?
    We only found the information on item level?
    Thanks a lot.

    hope its possible,
    If don't specify any item no for condition type in bapi, then it will be consider as header condition.
    make sure condition should be header condition.
    hope it will work.
    Regards,
    Marreddy

  • I need to vary up a purchase order and add an attachment at the same time.

    I can't see how this is done in iProcurement. I know I can ask the buyer to add the attachment to the approved PO via the buyers workcentre (and only then does the document appear while querying the PO at the header level) but why can't I add a new attachment when I am in iProc when I 'change' my requisition?
    The idea is that while the changed requisition is moving through the approval workflow all approvers can view the document which supports the reason for the variance. I loathe asking the chief exec to first go and view an attachment at PO header level first before going back to his worklist and then approving the requisition somewhere else.  It seems a convoluted way for approvers to view any supporting documentation. 
    I am using R12.
    Thanks

    Hey,
    There are a number of them [https://addons.mozilla.org/en-US/thunderbird/search/?q=dsn%20extensions DSN extention search results]
    If you have any questions about the support for those add ons please see their support page that is listed on the add on profile page.

  • Adding Variant in Header Level in the Sales Order

    Field "Card Verification Value" (CVV) is part of the Standard from Support Package SAPKH47028 onwards. But if you like you can use a variant for screen SAPMV45A4440 and set
    field "Card Verif.Code" to invisible in this variant.
    This is the reply from SAP after implementing the new support pack. Now there is an additional field in VA01 that I am trying to remove.
    I can add the variant in Table Settings but that is on Item Level in the Sales Order (VA01). How do I do it in Header Level?

    Hi,
    Go to SHD0 ,write down the Transaction code , transaction variant then go to Tab " With Processing'.
    Now you will be in T Code VA01 ,press enter and you will get all the variants maintained in Header Level.
    Now you can activate / deactivate as per your requirement.
    Best Regards,
    Ankur

  • Which structure field contains the header level net price of sales order ?

    Hi Friends,
    I am writing a pricing routine for calculating ZSMR condition value in sales order header level. The formula for calculating is   (NET PRICE / NET SALES COST) / NET PRICE.
    Which structure contains the net price of the sales order in header level. KOMK structure does not contains the net price value.
    Any ideas is highly appreciable.
    Thanks,
    Sakthidoss.

    Sivanand,
    I can not use VBAK as I have not saved the sales order yet and before that I need to calculate the pricing condition. In the sales order header level, net price is showing. I want to know which structure contains that net price value.
    You have any thoughts whether I am in correct path?
    I will certainly appreciate your help by rewarding points.
    Edited by: dossgs on May 20, 2010 2:13 PM

  • Additional tab item level on MIGO supresses the excise tab at item level

    Hello Experts,
    I have used MB_MIGO_BADI to add an additional tab at item level.It is working properly.
    But now Iam facing a problem the additional tab supresses the excise tab that comes up dynamically at the item level,.
    Now how do i reslove this problem.
    Since excise details are entered later and the tab comes up dynamically my tab should not supress the excise tab at item level
    it should come after the excise tab.
    Now do I set this.
    Please help . highly appreciated. 
    Regards,
    Ranjith N

    Hi Balu,
    Thanks for your reply.
    I dint get you what you have explained.
    Hope you are clear with my problem.
    I have created a subscreen 'ZMIGOITEM' with screen number '9000'.
    In the PBO of BADI MB_MIGO_BADI I have displayed this subscreen.
    This is getting displayed at item level when I call Tcode 'MIGO'.
    After fillin up the details for performing GR..and when I check it it gives me a warning to fill in the excise details when I fill in the excise details at header level and check as per the standards an excise tab at item level should come up right ?
    Since i have added a additional tab the excise tab doesn't come up....the additional tab supress it ...
    Regards,
    Ranjith Nambiar

  • Price at header level then how to do billing

    Dear All,
    i have one scenario where the price is at header level.
    and for that reasoni have made the item catagory is not price relevant other wise it will ask price per each line item.
    now i faced the probel during the tiem of delivery
    after PGI when i am doing the billingby selecting the delivery document number error is comning that item is not billing relevant.
    so how can i do the billing.
    even i have tried with order related billing but then also its giving error as the same.
    so what is the bset possible way for this scenario.
    where we are having price at header and stock at the item level then how to do the billing.
    what will be the configuration steps.
    with hope and
    Regards
    Subrat

    Dear Raj,
    when ever i am givinbg price at header it is multiplying it self with the number of line item. so if we need to put any price we have to calculate it manually per unit price then we have to put the price in this . so its really giving a pain to us if the amount will be divided amonge the line item rather multiplying it self then it will be a solution for the issue.
    like if i m puting 1000 in the header its multiplying  to 10 line item and the header price is coming as 10000. but we need to put  amount as 10000 and it should divide it self with 10 item and per item it should come as 1000 rupees just the reverse what it coming now
    thanks for all ur support till now.
    with hope
    regards
    Subrat

  • How to manually delete Po at header level ?

    Hi,
    I can delete PO line items in my ECC60 system
    However, i would like to delete PO at header level.
    In EKKO , i can see the deletion flag in LOEKZ field.
    BUT in ME22N, i cannot find any button to delete PO at header level...
    Could somebody clarify the PO deletion at header level and the LOEKZ deletion flag in EKKO ?
    Kind regards,
    Yann

    Yann,
    To my knowledge you cannot directly delete PO from the system. You need to follow the archiving steps...
    1. Program: RM06EV47 - For setting Deletion Indicator
    2.  Program: RM06EW47 - For archiving the document.
    3. Program: RM06ED47 - For Deletion from the system.
    If you need further details you can go through this link <a href="http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4b63462a11d189000000e8323d3a/frameset.htm">Archiving Purchase documents</a>
    Hope this helps....Reward your points and close the thread if so,
    Regards,
    Prasobh

  • Discount value not updating at contract header level

    Dear Friends
    I am facing problem of updating discount value at contract header level. The scenario is u2026. my client used to provide certain service to their customer. For that they maintain quantity contract & bill them as per billing plan. When customer avail three or more  services they get 10% extra discount. Now the problem is after continue for some days if some customer wants to drop  one item we are cancelling the line item by assigning proper cancellation procedure but the  system is not reversing the 10% discount.
    Example u2013
    Contract valid for 1st Jan 2009 to 31st Dec 2010(Value for each service = 10)
    (Total no of item-3)
    (Discount-10%)
    Here bill value for each month is  10x3-(30x0.10) =27
    At the month of march 2009  customer decided to drop for one item so hence forth the bill value should be 10x2=20
    But the system is calculating 10x2-(20x0.10)=18
    We need to update the value at contract header level only to satisfy some CRM functionality.
    Please suggest how to solve this issue

    Hi,
    If that is  item condition then you can not change it at header level
    check in M/06 make it at header level  in change which can be made tab
    Regards
    Kailas Ugale

  • Making vendor down payment at PO header level and not item level

    Hi
    I am making downpayment to vendor. I am using new functionality in EHP 4 for making downpayment through purchase order. When I run ME2DP for making downpayment, it asks for PO item number also.
    But my requirement is to pay downpayment at PO header level and not PO item level.
    Please let me know how can I do payment at PO header level.

    Dear All,
    I am also facing the same problem. Though Advance is maintained in PO Header Level when we are trying to create  DP Request / DP system is asking line item mandatory. Suppose i have 2 line items  and maintain all the DP amount in first line item. I am making service entry for 2nd line item and bill for the second line item. Then in this case, the Down Payment clearing tab doesn't appear in MIRO. That means I am unable to adjust the advance for the line item though I have to adjust it.
    Problem is that there are more than 300 lines items in PO/WO. Hence it becomes difficult to maintain advance for each line or the user is forced to maintain certain amount in line item..
    Please help ..Its urgent
    Regards,
    Ganesh

Maybe you are looking for

  • SharePoint 2010 Search "Did You Mean" | How does it work?

    My customer has raised a concern that "Did you mean" functionality works inconsistently and issue is explained as below: 1. When I search for misspelled word such as "Maketting" , search page displays the option "Did you mean ""Marketting"? 2. When I

  • BAPI or Conversion Program for Head Office/Branch functionality

    We are shifting our Vendors to Head Office/Branch functionality.  Our ordering vendor now becomes a Branch.  We need to transfer any open items left in the Ordering vendor account, and move them to the new Head Office account. Has somebody done this

  • Please show addresses of hyperlinks in emails on hover

    Most browsers show you the target of a hyperlink when you hover over it, usually displayed at the bottom in the status bar. This lets you check before you click, and is great for security and comfortable experience. Since you can click links in Thund

  • Can't see my iPad pdf files on iTunes

    Since the new update I have a problem. I can see the PDF's in my iPad, but when I connect the iPad to my Mac I cannot see them in iTunes. I can see my old books and PDF's just fine, but when I tried to drop a new PDF file into the book category of my

  • Fout:e auth user already registered

    ik heb een sony ereader PRS-T1, wil een ebook downloaden van de bibliotheek, maar krijg de melding: fout:e auth user already registered. Weet iemand de oplossing hiervoor?