How to get the Delivery date in PO line Item in SAPScript

Hi Gurus,
I am working on PO Script (MEDRUCK). I copied the Standard to a Z form. ZMM_MEDRUCK, Now I need to print the the Header text at the end of MAIN window.  I put Iem number along with the other line Item informmation like stanadrd PO Script MEDRUCK. I also want to show the delivey date with line Item, so Itried to use EKET-EINDT but it is returning the delivery date of last line item, means while printing the first line and other information it is showing the delivery date of the last line item, I tried with the  PEKPO-EINDT it is also not working.
Can any body suggest me how i can get the delivery date for the respective line Item  ?
Regards
Sony

actually your are picking up the correct data from Table EKET (EKET-EINDT) but your are printing that in item data loop for EKET might have already executed in your script and the header of that internal table consist the last entry of the table so for that. Fetch the delivery date explicite from the Table EKET when your in item level processing and print that.
For Example u can use this code.
To print you have write the this code in Script item level printing window "MAIN" window
Following perform is called to get the line item delivery date in PO
{/: PERFORM GET_DEL_DATE IN PROGRAM ZPerform_prog
/: USING &EKPO-EBELN&
/: USING &EKPO-EBELP&
/: CHANGING &DEL_DATE&
/: ENDPERFORM}
{* Dellivery date &DEL_DATE& }
write the below code in the Z program "ZPerform_prog"
{ FORM get_del_date  TABLES in_par STRUCTURE itcsy
                         out_par STRUCTURE itcsy.
  READ TABLE in_par WITH KEY 'EKPO-EBELN'.
  CHECK sy-subrc = 0.
  $_po_no = in_par-value.
  READ TABLE in_par WITH KEY 'EKPO-EBELP'.
  CHECK sy-subrc = 0.
  $_po_line = in_par-value.
  SELECT *
  FROM eket UP TO 1 ROWS WHERE ebeln EQ $_po_no AND ebelp EQ $_po_line.
    $_del_date = eket-eindt.
    CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
      EXPORTING
        date_internal            = eket-eindt
      IMPORTING
        date_external            = $_del_date
      EXCEPTIONS
        date_internal_is_invalid = 1
        OTHERS                   = 2.
    READ TABLE out_par WITH KEY 'DEL_DATE'.
    CHECK sy-subrc EQ 0.
    out_par-value = $_del_date.
    MODIFY out_par
                INDEX sy-tabix.
    CLEAR : $_po_no , $_po_line ,$_del_date.
  ENDSELECT.
ENDFORM.                    "GET_DEL_DATE }

Similar Messages

  • How to get the Deliver Quantity against Schedule Line Quantity

    Hi,
    I have specific requirement for a report where we need to determine the delivery qty against the schedule line qty for a sales order. In sales order in schedule line tab system shows the delivery qty. The field is VBEPD-VSMNG. VBEPD is a structure and I could not find the table in which this is actually stored. Does anybody know how to get the delivery qty for schedule line?

    Hi,
    U can check the following tables:
    VBEP (Sales ScheduleLines) VBEP-VBELN =VBAP-VBELN and VBAP-POSNR = VBEP-POSNR
    LIPS (SalesDoc:Delivery Items) LIPS-VGBEL =VBAP-VBELN and LIPS-VGPOS =
    VBAP-POSNR
    VBEH (Schedule LineHistory) VBELN POSNR ETENR
    Regards
    Kannaiah

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • How to get the Delivery address for PO

    I have a problem.
    I am working on a SAP Script , which is for PO(Zmedruck_po) , which is a copy of
    MEDRUCK.
    I am asked to print the delivery adress in a window .
    The scenario is like this .
    In ME23N , under item details , there is a tab called DELIVERY ADDRESS
    this has option to enter the adress details or a delivery number in the  address text box .
    If the address number is present i have to print that address , else i have to print the address which is entered in the delivery address tab.
    If the delivey address number is there i have no problem in printing it ,But if address number is not there ,I need to know how to get the delivery address,
    is it the plant address, company code address ... ?
    I debuged ,but could not find out.
    Can anyone help please .

    Hi,
    try using the below method:
    Goto TWLAD table with storage location (EKPO-LGORT) as key to get address number (ADDRNUMBER).  then goto ADRC table to get the address of the delivery
    Regards
    Shiva

  • How to get the "current date" in the BEx?

    Hi all,
    I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
    Thanks

    1. Create a  New Formula in Key Figures structure
    2. Give tech name and description and Select "New variable" option
    3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
    4. in next screene  select the date characteristic that represents the first date to use in the calculation (From Date)
    5. In the next  screen select Key in the Replace Variable with field. Leave all the other options as they are
    6. In the next Currencies and Units screen select Date as the Dimension ID.
    6. Save variable
    repeate the Above steps to create another variable (To Date)
    and now you can use these two new replacement path variables in your new formula.
    Dev

  • How to get the current date in a workflow

    Hey,
    Can anyone tell me how to get the current date while in a workflow?
    Thanks in advance.

    Here is how we did it, hope it helps
    <defvar name='locCalendar'>
    <new class='java.util.GregorianCalendar'/>
    </defvar>
    <defvar name='dateFormat'>
    <new class='java.text.SimpleDateFormat'>
              <s>MM/dd/yyyy</s>
         </new>
    </defvar>
    <defvar name='formatedDate'>
         <invoke name='getTime'>
    <ref>locCalendar</ref>
    </invoke>
    </defvar>
    <invoke name='format'>
    <ref>dateFormat</ref>
    <ref>formatedDate</ref>
    </invoke>

  • How to get the current date ? in the form of dd/mm/yyyy?

    Hi all,
    As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
    Regards
    Ashvini

    HI,
    Than u for the reply. But i am getting one error.
    as u said, I tried to do so.........
    but, i am getting one error.
    code
    Calendar cald=(Calendar.getInstance.getTime());
    out.println(cald);
    error message
    validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
    Calendar cald=(Calendar.getInstance.getTime());
    ^
    1 error
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    Pls help
    Regards,
    Ashvini

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to get the manufacturing date of iphone 5s?

    how to get the manufacturing date of iphone 5s?
    thanks

    Enter your serial number here:
    www.appleserialnumberinfo.com/Desktop/index.php
    To find your serial number:
    Settings > General > About > Serial Number

  • How to get the pixel data so as to work on it?

    Hi all,
    I am trying to write a plug-in that will crop and scale the image, edit the selection in the image document based on image data. For this purpose I need the pixel data of the image. How to get the image data as different pixels and what is the data structure used to store this data?
    Assumption: No layers i.e., only background
    Thanks in advance,
    Sailu

    Hi Ilya,
    Thank you for your post. In the plugin architecture you propose (automation + filter), do you have an idea about how to share the pixel data between the two plugins? I have found a post that gives details about how to get pixel data and show it using ADM components
    Matthew Hollingworth, "ADM Color Managed Preview?" #1, 22 Oct 2007 11:53 pm but it supposes that you have a filter plug-in.
    Again, does anyone knows how to preview the current image in a AUTOMATION plug in? This seems impossible.
    Thank you all for your help
    Cheers,
    Chaker

  • How to get the creation date of an event/meeting

    I need to implement some control rules on booking conference rooms depending on the creation date and start date.
    For example:
    - the booking cannot be accepted if the meeting start date is less than 2 hours ahead
    at 3:00 PM I can book the conference room for a meeting starting at 5:05PM
    but not for a meeting starting at 4:55PM
    - the booking cannot be accepted after 5:30PM for a meeting starting the next morning before 10:00AM
    at 5:45PM I can book the conference room for a meeting tomorrow at 11:00AM, but not for a meeting at 9:45AM

    Hi Michel,
    how to get the creation date of an event/meeting?When you use the calendar sdk to fetch a meeting there is an Icalendar(http://www.ietf.org/rfc/rfc2445.txt) property called CREATED with the creation time in UTC.
    For example:
    - the booking cannot be accepted if the meeting start
    date is less than 2 hours ahead
    at 3:00 PM I can book the conference room for a
    meeting starting at 5:05PM
    but not for a meeting starting at 4:55PM
    You would want to implement these rules with with the sdk? That would implie that users connecting to the calendar server with any other client than the calendar sdk could still book these resources whenever they want.
    Or you would want to go an validate all the meetings once they are already created?
    Cheers,
    Jean-Philippe

  • How to get the delivery number for the sales order

    hi
    how to get the delivery number for the sales order

    Hi,
    1. IN VA03, enter the sales order and click on the document flow button. From there you can check the delivery document.
    2. In SE11, enter VBFA(Document flow) table and enter the sales order in VBELV field and in VBTYP_N field enter 'J' to specify that you want to check if there is already a delivery document for that sales order.
    Hope it helps...
    P.S. Please award points if it helps...

  • The dates my photos were taken are now incorrect.  Any suggestions on how to get the correct dates back?

    The dates my photos were taken are not incorrect.  Any suggestions on how to get the correct dates back?

    Thank you Winston.  This works and I can adjust several photos at the same time.

  • How to read/get the document attached to PO line item

    Hi experts,
    I got a requirement wherein I need to read/get the document attached at PO line item and to send that document through mail as an attacment .
    please suggest me how to proceed on this.

    actually your are picking up the correct data from Table EKET (EKET-EINDT) but your are printing that in item data loop for EKET might have already executed in your script and the header of that internal table consist the last entry of the table so for that. Fetch the delivery date explicite from the Table EKET when your in item level processing and print that.
    For Example u can use this code.
    To print you have write the this code in Script item level printing window "MAIN" window
    Following perform is called to get the line item delivery date in PO
    {/: PERFORM GET_DEL_DATE IN PROGRAM ZPerform_prog
    /: USING &EKPO-EBELN&
    /: USING &EKPO-EBELP&
    /: CHANGING &DEL_DATE&
    /: ENDPERFORM}
    {* Dellivery date &DEL_DATE& }
    write the below code in the Z program "ZPerform_prog"
    { FORM get_del_date  TABLES in_par STRUCTURE itcsy
                             out_par STRUCTURE itcsy.
      READ TABLE in_par WITH KEY 'EKPO-EBELN'.
      CHECK sy-subrc = 0.
      $_po_no = in_par-value.
      READ TABLE in_par WITH KEY 'EKPO-EBELP'.
      CHECK sy-subrc = 0.
      $_po_line = in_par-value.
      SELECT *
      FROM eket UP TO 1 ROWS WHERE ebeln EQ $_po_no AND ebelp EQ $_po_line.
        $_del_date = eket-eindt.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
          EXPORTING
            date_internal            = eket-eindt
          IMPORTING
            date_external            = $_del_date
          EXCEPTIONS
            date_internal_is_invalid = 1
            OTHERS                   = 2.
        READ TABLE out_par WITH KEY 'DEL_DATE'.
        CHECK sy-subrc EQ 0.
        out_par-value = $_del_date.
        MODIFY out_par
                    INDEX sy-tabix.
        CLEAR : $_po_no , $_po_line ,$_del_date.
      ENDSELECT.
    ENDFORM.                    "GET_DEL_DATE }

  • How to get the baselinegrid position for a line?

    Hi All,
    How to get the baselinegrid position for a line in a paragraph?

    Hi,
    2nd line baseline grid for yourPara paragraph is:
    yourPara.lines[1].baseline;
    last line baseline is:
    yourPara.endBaseline;
    Jarek

Maybe you are looking for

  • Xz1 screen mirroring -no sound

    hello. I have xperia z1 firmware 14.2.a.1.136. the problem is- no sound when combined screen mirroring (no problem with image-I can see phone screen  in TV) I tried to reset the phone to factory settings / repair by PCC-Repair Phone; TV-samsung  UE55

  • Matchcode for XD03

    Hi Freinds! I have a small problem in matchcode for XD03. I had to create a new matchcode for XD03 which would extend the search help of customers by account group by two additional fields. We have an existing search help which has the following fiel

  • Songs in trash....

    Hi. By an error I have put a lot of songs in trash. exactly 100 000+. How can I get them back, without to take them peace by peace and "put them back" to where they belongs? Does anyone have an idea how to clean, and find the duplicates ? (I know the

  • Error 0x80072f0d & Certificates

    Hi at all I have some problems and I think that the first candidates is the certificates configuration. My system is a small cluster with two nodes and it is configured in this mode: NodeA: Windows Server 2008 R2 with Hyper role NodeB: Windows Server

  • Upgrading LiveType?

    Well I installed Final Cut Express right when I got my macbook pro. And it included LiveType. Now I just installed Final Cut Studio, and I know there are more LiveType features (fonts, livefonts, textures, etc.) When I check LiveType there were more