on 04-13-2009 11:08 AM
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 }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you check this?
VBDPL-ABRDT----Delivery Schedule Date
Regards
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sony,
You can get the Expected Delivery Date from Table VBEP. There you can get the Field WADAT (Goods Issue Date) for any combination of VBELN and POSNR.
For any item of any Sales Order the Highest Date (Latest Date) is the Expected Delivery Date.
Hope this helps you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use structure RM06P-LFDAT for Delivery date.
Regards,
Raju.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.