Goods issue date and goods receipt date
Hi Guys,
i was asked to display STO list.They asked me add goods issue date and goods Report date in the o/p columns.So any body can tell me what are the fields for goods issue and goods Receipt date's.?can u guys tell me the Tr code for these fields .?
Thanks,
Gopi.
Hi there,
I already solve it by myself.
Actually is i call the initialization twice:
Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
Thats what make this problem happened.
Sorry.
Best Regards,
danny
Similar Messages
-
Restrict goods issue if stock on posting date is zero
Requirement:
Current Inventory period : July 2011
Stock of a material from 01.07.2011 to 30.07.2011 is zero(in MB5B report)
I upload stock of material or GRN occur on 31.07.2011. Say Quantity u2013 100
Now stock as on 31.07.2011 is 100 in MB5B
Still, Stock of a material from 01.07.2011 to 30.07.2011 is zero(in MB5B)
Now, If I do goods issue of a material quantity 100 on 15.07.2011. System allows goods issue. though opening and closing stock as on 15.07.2011 is zero.
After goods issue transaction if I check stock of material on any date between 16.07.2011 to 30.07.2011 , The opening stock and closing stock shows negative.
I want to restrict goods issue if stock on posting date is zero or less then stock available on posting date.
Please suggestHi,
This is not the way SAP is designed. As the previous speakers wrote (and as you noticed yourself), SAP maintains stock figures in the database per month rather than per day. MB5B makes complex calculations in order to find out how much stock you had on a specific date - as you probably noticed on the response time. Performing such calculations every time you do a GI would be unfeasibly heavy task for the system - remember there are organisations that perform hundreds of inventory movements a minute!
An alternative solution I suppose would be to maintain the daily stock figures in the database. This would make the finding of the stock figure very quick, but on the other hand, the maintenance of such table would be unfeasible - if you post today a GI on say July 1st, you would need to calculate 36 stock figures and update 36 database records!
Hope this explains the technical issue.
BR
Raf -
Actual GI (gods issue) date and planned GI date
Can you explain about actual GI (gods issue) date and planned GI date? Can actual GI date differ from planned GI date? can anyone pls give me the ans.....
Hi,
Planned GI Date : It is the date on which the goods must be physically dispatched from the shipping so that it can reach customer on the Requested Delivery Date (RDD) or on-time. It can be calculated as follows :
Planned GI Date = RDD - (pick/pack time + loading time + transit time)
Actual GI Date : Actual date on which physical goods movement happens from shipping point. Goods issue document to account for the outgoing inventory is normally created on Actual GI Date.
Hope it adds info..
Thanks -
Goods Issue based on Goods receipt.
Hello,
Can any body suggest query on "Goods Issue based on Goods receipt."
Scenario :
Suppose P.O has been created @10/- for 100 Quantity . GR has done for 100/-in Month of June, now another P.O has created @12/- for 100 Quantity in Month of July and GR done for the same , I want to Isuue Goods in Month of july and expect system should take price of @10/- for first 100 Quantity and @12/- for the rest quantity.
Could you advise.?
Thanks & Regards
SudhansuHi,
For FIFO Configuration,
1. Ensure FIFO is active tcode OMWE
2. FIFO maintained at company code or plant level T code: MRLH
3. Movement type settings for FIFO T code OMW4
4. Preparation of FIFO in MMR T code: MRF4
5. Run the FIFO valuation T code MRF1 -
Values in "vendor batch" in the Goods-in-order and Goods-in-plan lists are
Vendor batch No. : Transaction ZJPMPU322
(Background)
There are "vendor batch" and "batch" fields in Goods-in-order and Goods-in-plan lists (transaction ZJPMPU322). Values for these fields are retrieved from inbound delivery document (transaction VL33N). After core 7.0 upgrade, "vendor batch" is not copied from "batch" in inbound delivery document any more so that nothing appears in the vendor batch field in the lists.
(Change request)
Values in "vendor batch" in the Goods-in-order and Goods-in-plan lists are retrieved from "batch" in inbound delivery document ONLY IF "vendor batch" is blank in the inbound delivery document.
(Current design)
Batch is retrieved from LIPS-CHARG
Vendor batch is retrieved from LIPS-LICHN
(If there is no record in LIPS, blank will be printed out for both fields)
(After change)
Batch is retrieved from LIPS-CHARG
Vendor batch is retrieved from LIPS-LICHN only if LIPS-LICHN is not blank.
If LIPS-LICHN is blank, vendor batch is retrieved from LIPS-CHARG.
(If there is no record in LIPS, blank will be printed out for both fields. If both LIPS-CHARG and LIPS-LICHN are blank, blank will be printed out for both fields),
Following is the program:
REPORT zjpmrpu322 MESSAGE-ID zjpm001
NO STANDARD PAGE HEADING
LINE-COUNT 50
LINE-SIZE 255.
*& Development ID: PU_DD_322_LJP *
*& Report : ZJPMRPU322 *
*& The Purpose of this program is to print the Goods-in-order list *
*& and the Goods in plan list for raw materials, materials purchase *
*& etc at the Sasayama plant, Japan. *
*& Change Log: *
*& Init Who Date Text *
*& PV P V R S Varma 07-May-2003 Initial Version *
*& DU D.Usui 2004/02/26 CR No. 1432 *
*& DU D.Usui 2004/03/08 CR No. 1447 *
*& DU D.Usui 2004/05/06 CR No. 1591 *
Constants
CONSTANTS:
c_werks LIKE ekpo-werks VALUE 'JP01', "Plant code - Sasayama plant
c_id LIKE thead-tdid VALUE 'F02', "Text ID for Info record
c_object LIKE thead-tdobject VALUE 'EKPO',"Object of text for info rec
*c_zzjp_r1 LIKE marc-zzjp_re1 VALUE 'GMP', "Goods in plan- Domestic
*c_zzjp_r2 LIKE marc-zzjp_re1 VALUE 'GMPI', "Import sales order document
c_plus TYPE c VALUE '', "Holding '' sign
c_spras LIKE makt-spras VALUE 'J', "Language key Japan
*c_device(7) type c value 'PRINTER', "Device type
c_form(16) TYPE c VALUE 'ZJPMPU305', "Form name
c_ele_gmp(4) TYPE c VALUE 'GMP', "GMP Text element
c_ele_gmpi(4) TYPE c VALUE 'GMPI', "GMPI Text element
add begin CR1432
c_ele_bgmp(4) TYPE c VALUE 'BGMP', "BGMP
c_ele_bgmpi(5) TYPE c VALUE 'BGMPI', "BGMPI
add end CR1432
c_function(3) TYPE c VALUE 'SET', "Function
c_type(4) TYPE c VALUE 'BODY', "Window area in main window
c_win_head(7) TYPE c VALUE 'HEADING', "Heading window
c_win_shead(7) TYPE c VALUE 'SUBHEAD', "sub heading window
c_win_fot1(7) TYPE c VALUE 'FOOTER1', "Footer 1 window
c_win_main(4) TYPE c VALUE 'MAIN', "Main window
c_comd(8) TYPE c VALUE 'NEW-PAGE', "New-page command
c_zar TYPE ekko-bsart VALUE 'ZAR',
c_x TYPE c VALUE 'X', "Indicator for print options
c_f TYPE c VALUE 'F', "Indicator for Purchase Order
add begin CR1591
Deletion indicator in purchasing document
c_loekz(1) TYPE c VALUE 'L',
For ranges tables
c_sign_i(1) TYPE c VALUE 'I', "Sign(include)
c_op_eq(2) TYPE c VALUE 'EQ', "Option(=)
Confirmation category
c_ebtyp_ab(2) TYPE c VALUE 'AB', "Order acknowledgment
add end CR1591
c_la(2) TYPE c VALUE 'LA'. "Indicator for Inbound deliver
Database Tables
Vaiables / Internal tables *
Internal table to store PO information
Not used after CR1591
DATA: BEGIN OF t_purc OCCURS 0,
ebeln LIKE eket-ebeln, "Purchasing Document Number
ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled quantity
charg LIKE eket-charg, "Batch number
matnr LIKE ekpo-matnr, "Material code
werks LIKE ekpo-werks, "Plant
meins LIKE ekpo-meins, "Unit of measure
lifnr LIKE ekko-lifnr, "Vendor number
END OF t_purc.
Internal table to store material description.
DATA: BEGIN OF t_makt OCCURS 0,
matnr LIKE makt-matnr, "Material code
maktx LIKE makt-maktx, "Material description
END OF t_makt.
Internal table for storage of final EKET data
DATA: BEGIN OF t_eket OCCURS 0,
ebeln LIKE eket-ebeln, "Purchasing Document Number
ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
ebelp_ex(6) TYPE n, "Extended ebelp with length 6
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled quantity
dabmg LIKE ekes-dabmg, " Delivered Quantity
charg LIKE eket-charg, "Batch number
matnr LIKE ekpo-matnr, "Material code
werks LIKE ekpo-werks, "Plant
maktx LIKE makt-maktx, "Material Description-- jp check
etens LIKE ekes-etens, "Sequence Number
meins LIKE ekpo-meins, "Unit of measure
lifnr LIKE ekko-lifnr, "Vendor number
vbeln LIKE ekes-vbeln,
vbelp LIKE ekes-vbelp,
vpnam(40) TYPE c, "Vendor product name
END OF t_eket.
Internal table for extraction of data from EKES
Not used after CR1591
DATA: BEGIN OF t_ekes OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE ekes-eindt, "Item delivery date
menge LIKE ekes-menge, "Scheduled Quantity
dabmg LIKE ekes-dabmg, " delivered quantity
vbeln LIKE ekes-vbeln,
vbelp LIKE ekes-vbelp,
mark TYPE c,
END OF t_ekes.
Internal table for extraction of data from EKES
Not used after CR1591
DATA: BEGIN OF t_ekes_temp OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE ekes-eindt, "Item delivery date
menge LIKE ekes-menge, "Scheduled Quantity
END OF t_ekes_temp.
Internal table for storing data from MLGN table.
DATA: BEGIN OF t_mlgn OCCURS 0,
matnr LIKE mlgn-matnr, "material code
lhmg1 LIKE mlgn-lhmg1, "Standard pallet size
lhme1 LIKE mlgn-lhme1, "Unit of measure
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
END OF t_mlgn.
Internal table for storing data from MARM table.
DATA: BEGIN OF t_marm OCCURS 0,
matnr LIKE marm-matnr, "material code
umrez LIKE marc-zzjp_cas_size, "Std package unit
meins LIKE ekpo-meins, "alternate unit
END OF t_marm.
Internal table for storing data from MARC table.
DATA: BEGIN OF t_marc OCCURS 0,
matnr LIKE marc-matnr, "Material code
zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
zzjp_aprn LIKE marc-zzjp_aprn, "Apperance
zzjp_re1 LIKE marc-zzjp_re1, "Heading
END OF t_marc.
Internal table for storing data from lfa1 table.
DATA: BEGIN OF t_lfa1 OCCURS 0,
lifnr LIKE lfa1-lifnr, "Vendor code
name1 LIKE lfa1-name1, "Vendor name
END OF t_lfa1.
Internal table for Storing data from LIPS table.
DATA: BEGIN OF t_lips OCCURS 0,
vbeln LIKE lips-vbeln, "Delivery document no
posnr LIKE lips-posnr, "Item number for Delivery document
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
END OF t_lips.
Internal table for storing the final display data.
DATA: BEGIN OF t_display OCCURS 0,
g_checkbox type c, "check box for selection of records
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled Quantity
vpnam(40) TYPE c, "Vendor product name
lifnr LIKE ekko-lifnr, "Vendor code
name1 LIKE lfa1-name1, "Vendor name
meins LIKE ekpo-meins, "Unit of measure
matnr LIKE ekpo-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description-- jp check
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
lhmg1 LIKE mlgn-lhmg1, "standard pallet size
lhme1 LIKE mlgn-lhme1, "Unit of standard pallet
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
umrez LIKE marc-zzjp_cas_size, "Std package unit
meinh LIKE ekpo-meins, "alternate unit
zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
zzjp_aprn LIKE marc-zzjp_aprn, "Apperance
zzjp_re1 LIKE marc-zzjp_re1, "Heading
std_pac_no(13) TYPE n, "Std receipt package no
tot_std_pt(13) TYPE n, "Total no of std pallets
add begin CR1447
Add new field 'Goods-in-order','Item' for goods in plan list
vbeln like ekes-vbeln, "Goods-in-order
vbelp like ekes-vbelp, "Item
add end CR1447
END OF t_display.
Internal table for storing the final display data -Goods in order list
DATA: BEGIN OF t_display1 OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled Quantity
vpnam(40) TYPE c, "Vendor product name
lifnr LIKE ekko-lifnr, "Vendor code
name1 LIKE lfa1-name1, "Vendor name
meins LIKE ekpo-meins, "Unit of measure
matnr LIKE ekpo-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description-- jp check
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
lhmg1 LIKE mlgn-lhmg1, "standard pallet size
lhme1 LIKE mlgn-lhme1, "Unit of standard pallet
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
umrez LIKE marc-zzjp_cas_size, "Std package unit
meinh LIKE ekpo-meins, "alternate unit
zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
zzjp_aprn LIKE marc-zzjp_aprn, "Apperance
zzjp_re1 LIKE marc-zzjp_re1, "Heading
std_pac_no(13) TYPE n, "Std receipt package no
tot_std_pt(13) TYPE n, "Total no of std pallets
END OF t_display1.
Internal table for storing the final display data - Goods in plan list
DATA: BEGIN OF t_display2 OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled Quantity
name1 LIKE lfa1-name1, "Vendor name
meins LIKE ekpo-meins, "Unit of measure
matnr LIKE ekpo-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description-- jp check
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
lhmg1 LIKE mlgn-lhmg1, "standard pallet size
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
tot_std_pt(13) TYPE n, "Total no of std pallets
add begin CR1447
Add new field 'Goods-in-order','Item' for goods in plan list
vbeln like ekes-vbeln, "Goods-in-order
vbelp like ekes-vbelp, "Item
add end CR1447
END OF t_display2.
add begin CR1591
RANGES: r_matnr FOR mara-matnr, "for p_matnr
r_ebeln FOR ekpo-ebeln. "for p_ebeln
add end CR1591
DATA: line TYPE i. " line number
DATA: g_checkbox TYPE c. "check box for selection of records
DATA: g_tab LIKE sy-index. "variable to hold index
DATA g_tabix LIKE sy-tabix. "holder for table index
Printing Options.
DATA: lw_pr_options LIKE itcpo.
*lw_pr_options-tddest = 'SA03'. " Print Device Name
lw_pr_options-tdpreview = 'X'. " Print Preview
lw_pr_options-tdnewid = 'X'. " New Request
lw_pr_options-tdlifetime = 2. " Retention in Spool
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
SELECT-OPTIONS:
s_date FOR sy-datum DEFAULT sy-datum. " Search period.
PARAMETERS:
p_matnr LIKE mara-matnr, " Material code
p_ebeln LIKE ekpo-ebeln. " Purchase Document No
SELECTION-SCREEN END OF BLOCK blk1.
Selection Screen Checks *
AT SELECTION-SCREEN.
IF ( s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
MESSAGE e000 WITH 'Entry Must in atleast one of the Fields'(t00).
ENDIF.
IF ( NOT p_matnr IS INITIAL ) AND
( s_date IS INITIAL ) AND
( p_ebeln IS INITIAL ).
MESSAGE e000 WITH 'Date should also be Entered'(t01).
ENDIF.
del begin CR1591
This check is not found in original FS
IF ( NOT p_matnr IS INITIAL ) AND
( s_date IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
MESSAGE e000 WITH 'Date should also be Entered'(t01).
ENDIF.
del end CR1591
Validations for Data selection *
del begin CR1591
Waste check
IF ( NOT s_date IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
PERFORM f_check_date_in_eket.
ENDIF.
IF ( NOT s_date IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
PERFORM f_check_matnr_in_plant.
PERFORM f_check_matnr_in_ekpo.
PERFORM f_check_date_in_eket.
PERFORM f_check_matnr_in_plant.
PERFORM f_check_matnr_in_ekpo.
ENDIF.
IF ( NOT s_date IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
PERFORM f_check_matnr_in_plant.
PERFORM f_check_matnr_in_ekpo.
PERFORM f_check_date_in_eket.
PERFORM f_check_ebeln_in_ekpo.
PERFORM f_check_werks_in_ekpo.
ENDIF.
IF ( NOT p_ebeln IS INITIAL ) AND
( NOT s_date IS INITIAL ) AND
( p_matnr IS INITIAL ).
PERFORM f_check_date_in_eket.
PERFORM f_check_ebeln_in_ekpo.
PERFORM f_check_werks_in_ekpo.
ENDIF.
IF ( NOT p_ebeln IS INITIAL ) AND
( s_date IS INITIAL ) AND
( p_matnr IS INITIAL ).
PERFORM f_check_ebeln_in_ekpo.
PERFORM f_check_werks_in_ekpo.
ENDIF.
del end CR1591
Data selection from Tables *
START-OF-SELECTION.
SET PF-STATUS 'SELECT'.
add begin CR1591
Set ranges tables
PERFORM set_ranges.
add end CR1591
mod begin CR1591
**Selection of PO data from EKET into internal table t_purc.
PERFORM f_select_eket.
**Selection of corresponding PO data for EKET from EKES into t_ekes.
PERFORM f_select_ekes.
**Selection of material desc from MAKT table into T_makt.
PERFORM f_select_makt.
**Copy the contents of t_purc and t_makt into t_eket table.
PERFORM f_move_eket.
**Replace the corresponding entries of t_eket with t_ekes.
PERFORM f_update_eket.
Selection of PO data from EKET into internal table T_EKET.
PERFORM f_select_eket2.
Selection of corresponding PO data from EKES appending to T_EKET.
PERFORM f_select_ekes2.
Selection of material desc from MAKT table into T_MAKT.
PERFORM f_select_makt2.
mod end CR1591
*Selection of vendor product name.
PERFORM f_select_vpnam.
del begin CR1591
No need
**copy t_eket-ebelp into temporary variable.
PERFORM f_copy_ebelp.
del end CR1591
*selection of data from MLGN table into t_mlgn internal table
PERFORM f_select_mlgn.
*selection of data from marm table into t_marm internal table
PERFORM f_select_marm.
*selection of data from marc table into t_marc internal table
PERFORM f_select_marc.
*selection of data from lfa1 table into t_lfa1 internal table
PERFORM f_select_lfa1.
*Selection of data from LIPS table into t_lips internal table
PERFORM f_select_lips.
del begin CR1591
Don't display list screen when no data exists
*END-OF-SELECTION.
del end CR1591
*lines = sy-linno - 1.
*Collection of data into the final display internal table t_Display
PERFORM f_collect_final.
*Display the contents of t_display as a simple List
PERFORM f_list_display.
AT USER-COMMAND.
PERFORM f_select_layout.
INCLUDE zjpmipu315.
INCLUDE zjpmipu316.
*& Form f_check_MATNR_in_plant
This Routine is to check if the the selected material code is
available in the plant 'JP01'.
FORM f_check_matnr_in_plant.
DATA: l_matnr LIKE mara-matnr.
SELECT matnr UP TO 1 ROWS FROM marc
INTO l_matnr
WHERE
matnr = p_matnr AND
werks = c_werks.
ENDSELECT.
IF l_matnr IS INITIAL.
MESSAGE e000 WITH
'The material is not available in '(t02) c_werks 'plant'(t20).
ENDIF.
ENDFORM. " f_check_MATNR_in_plant
*& Form f_check_EBELN_in_EKPO
This Routine is to check if the Purchase order number selected
is existing or not and if it exists, check if it is related to
the plant 'JP01'.
FORM f_check_ebeln_in_ekpo.
DATA: l_ebeln LIKE ekpo-ebeln.
SELECT ebeln UP TO 1 ROWS FROM ekpo
INTO l_ebeln
WHERE
ebeln = p_ebeln AND
werks = c_werks.
ENDSELECT.
IF l_ebeln IS INITIAL.
MESSAGE e000 WITH
'PO not available or not related to '(t03) c_werks 'plant'(t21).
ENDIF.
ENDFORM. " f_check_EBELN_in_EKPO
*& Form f_check_matnr_in_ekko
This routine is to check if any PO exist for the selected
Material code.
FORM f_check_matnr_in_ekpo.
DATA: l_matnr LIKE ekpo-matnr.
SELECT matnr UP TO 1 ROWS FROM ekpo
INTO l_matnr
WHERE
matnr = p_matnr.
ENDSELECT.
IF l_matnr IS INITIAL.
MESSAGE e000 WITH
'PO does not exist for the material no'(t04) p_matnr.
ENDIF.
ENDFORM. " f_check_matnr_in_ekpo
*& Form f_check_date_in_eket
This routine is to check if any purchase order exists
with the selected
FORM f_check_date_in_eket.
DATA: l_eindt LIKE eket-eindt.
SELECT eindt UP TO 1 ROWS FROM eket
INTO l_eindt
WHERE
eindt IN s_date.
ENDSELECT.
IF l_eindt IS INITIAL.
MESSAGE e000 WITH
'No PO exist with the selected delivery date '(t05).
ENDIF.
ENDFORM. " f_check_date_in_eket
*& Form f_check_werks_in_ekpo
This Routine is to check if the selected purchase order
is associated with the plant JP01
FORM f_check_werks_in_ekpo.
DATA: l_ebeln LIKE ekpo-ebeln.
SELECT ebeln UP TO 1 ROWS FROM ekpo
INTO l_ebeln
WHERE
werks = c_werks.
ENDSELECT.
IF l_ebeln IS INITIAL.
MESSAGE e000 WITH
'The selected P0 is not relevant to '(t06) c_werks 'plant'(t22).
ENDIF.
ENDFORM. " f_check_werks_in_ekpo
*& Form f_select_eket
Routine to collect data from EKET, EKPO, MAKT, EKKO tables
using inner join and store the data into internal table
t_PURC. The data selection is based on the selection screen's
input.
FORM f_select_eket.
IF ( NOT s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( NOT s_date-low IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~matnr = p_matnr AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( NOT s_date-low IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~matnr = p_matnr AND
ekpo~ebeln = p_ebeln AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
ekpo~ebeln = p_ebeln AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( NOT s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~ebeln = p_ebeln AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ENDIF.
IF sy-subrc <> 0.
MESSAGE s000 WITH 'Data not found'(t07).
LEAVE LIST-PROCESSING.
ELSE.
SORT t_purc.
ENDIF.
ENDFORM. " f_select_eket
*& Form f_select_makt
Routine to select the material description for all the
materials present in T_purc table
FORM f_select_makt.
DATA: l_t_makt(4) TYPE c VALUE 'MAKT'.
SELECT
matnr
maktx
FROM
makt
INTO TABLE t_makt
FOR ALL ENTRIES IN t_purc
WHERE
matnr = t_purc-matnr AND
spras = c_spras.
IF sy-subrc <> 0.
MESSAGE s000 WITH
'Relevant data not found in'(t09) l_t_makt 'table'(t23).
ELSE.
SORT t_makt.
ENDIF.
ENDFORM. " f_select_makt
*& Form f_move_eket
Routine to join data in T_PURC and T_MAKT tables into
internal table T_MAKT.
FORM f_move_eket.
LOOP AT t_purc.
t_eket-ebeln = t_purc-ebeln.
t_eket-ebelp = t_purc-ebelp.
t_eket-eindt = t_purc-eindt.
t_eket-menge = t_purc-menge.
t_eket-charg = t_purc-charg.
t_eket-matnr = t_purc-matnr.
t_eket-werks = t_purc-werks.
t_eket-meins = t_purc-meins.
t_eket-lifnr = t_purc-lifnr.
READ TABLE t_makt WITH KEY matnr = t_purc-matnr
BINARY SEARCH.
IF sy-subrc = 0.
t_eket-maktx = t_makt-maktx.
ENDIF.
APPEND t_eket.
CLEAR t_eket.
ENDLOOP.
ENDFORM. " f_move_eket
*& Form f_select_ekes
Routine to select EKES data for all corresponding entries
of T_EKET.
FORM f_select_ekes.
DATA: l_tabix TYPE i.
IF NOT s_date IS INITIAL.
SELECT
ebeln
ebelp
etens
eindt
menge
INTO TABLE t_ekes
FROM
ekes
WHERE
eindt IN s_date.
ELSE.
DESCRIBE TABLE t_purc LINES l_tabix.
IF l_tabix GT 0.
SELECT
ebeln
ebelp
etens
eindt
menge
dabmg
vbeln
vbelp
FROM
ekes
INTO TABLE t_ekes
FOR ALL ENTRIES IN t_eket
FOR ALL ENTRIES IN t_purc
WHERE
ebeln = t_purc-ebeln AND
ebelp = t_purc-ebelp AND
eindt IN s_date.
AND ebeln eq p_ebeln.
and matnr in p_matnr.
ENDIF.
CLEAR l_tabix.
IF NOT s_date IS INITIAL AND NOT p_ebeln IS INITIAL.
SELECT
ekes~ebeln
ekes~ebelp
ekes~etens
ekes~eindt
ekes~menge
ekes~dabmg
APPENDING TABLE t_ekes
FROM ekes
WHERE
eindt IN s_date AND
ebeln EQ p_ebeln AND
ebtyp EQ c_la.
ELSEIF NOT s_date IS INITIAL AND p_ebeln IS INITIAL.
SELECT
ekes~ebeln
ekes~ebelp
ekes~etens
ekes~eindt
ekes~menge
ekes~dabmg
APPENDING TABLE t_ekes
FROM ekes
WHERE
eindt IN s_date AND
ebeln EQ p_ebeln AND
ebtyp EQ c_la.
ELSEIF s_date IS INITIAL AND NOT p_ebeln IS INITIAL.
SELECT
ekes~ebeln
ekes~ebelp
ekes~etens
ekes~eindt
ekes~menge
ekes~dabmg
APPENDING TABLE t_ekes
FROM ekes
WHERE
eindt IN s_date AND
ebeln EQ p_ebeln AND
ebtyp EQ c_la.
ENDIF.
IF sy-subrc = 0.
SORT t_ekes.
ENDIF.
IF NOT t_ekes[] IS INITIAL.
t_ekes_temp[] = t_ekes[].
SORT t_ekes_temp BY ebeln ebelp.
DELETE ADJACENT DUPLICATES FROM t_ekes_temp COMPARING ebeln ebelp.
LOOP AT t_ekes_temp.
READ TABLE t_purc WITH KEY ebeln = t_ekes_temp-ebeln
ebelp = t_ekes_temp-ebelp.
IF sy-subrc NE 0.
CLEAR t_purc.
SELECT SINGLE
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO CORRESPONDING FIELDS OF t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~ebeln = t_ekes_temp-ebeln
AND eket~ebelp = t_ekes_temp-ebelp
AND ekpo~elikz NE c_x
AND ekko~bstyp EQ c_f
AND ekko~bsart NE c_zar.
IF sy-subrc EQ 0.
APPEND t_purc.
CLEAR t_purc.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH: t_ekes_temp, t_ekes.
CLEAR: t_ekes_temp, t_ekes.
Once the header is filled up get the details from EKES
SELECT ebeln ebelp etens eindt menge dabmg vbeln vbelp
INTO TABLE t_ekes
FROM ekes
FOR ALL ENTRIES IN t_purc
WHERE ebeln EQ t_purc-ebeln.
Mark the entries as 'X' which falls in the date range
LOOP AT t_ekes.
IF t_ekes-eindt IN s_date.
t_ekes-mark = 'X'.
MODIFY t_ekes INDEX sy-tabix TRANSPORTING mark.
ENDIF.
ENDLOOP.
SORT t_ekes BY ebeln ebelp ASCENDING mark DESCENDING.
Delete the entries from eket if no entries in EKES falls in the period
LOOP AT t_purc.
l_tabix = sy-tabix.
READ TABLE t_ekes WITH KEY ebeln = t_purc-ebeln
ebelp = t_purc-ebelp.
IF sy-subrc EQ 0.
IF t_ekes-mark NE 'X'.
DELETE t_purc INDEX l_tabix.
ENDIF.
ENDIF.
ENDLOOP.
delete the entries from EKES which do not fall in the specified period
DELETE t_ekes WHERE mark NE 'X'.
ENDFORM. " f_select_ekes
*& Form f_update_eket
Routine to substitute relevant t_eket entries with that of
t_ekes entries.It does not modify the remaining entries for
for which the corresponding values in t_ekes doesnot exist.
FORM f_update_eket.
DATA: BEGIN OF lt_temp_eket OCCURS 0,
ebeln LIKE eket-ebeln, "Purchasing Document Number
ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled quantity
dabmg LIKE ekes-dabmg, " Delivered quantity
matnr LIKE ekpo-matnr, "Material code
maktx LIKE makt-maktx, "Material Description-- jp check
etens LIKE ekes-etens, "Sequence Number
meins LIKE ekpo-meins, "Unit of measure
lifnr LIKE ekko-lifnr, "Vendor number
charg LIKE eket-charg, " Batch number Added by PD 08/08/03
vbeln LIKE ekes-vbeln,
vbelp LIKE ekes-vbelp,
END OF lt_temp_eket,
l_menge LIKE ekes-menge.
LOOP AT t_eket.
LOOP AT t_ekes WHERE ebeln = t_eket-ebeln
AND ebelp = t_eket-ebelp.
Added by PD 08/08/03
MOVE t_eket-charg TO lt_temp_eket-charg.
addition ends
MOVE t_eket-ebeln TO lt_temp_eket-ebeln.
MOVE t_eket-ebelp TO lt_temp_eket-ebelp.
MOVE t_eket-meins TO lt_temp_eket-meins.
CLEAR l_menge.
l_menge = t_ekes-menge - t_ekes-dabmg.
IF l_menge LE 0.
CONTINUE.
ELSE.
MOVE l_menge TO lt_temp_eket-menge.
ENDIF.
MOVE t_ekes-eindt TO lt_temp_eket-eindt.
MOVE t_ekes-etens TO lt_temp_eket-etens.
MOVE t_eket-lifnr TO lt_temp_eket-lifnr.
MOVE t_eket-maktx TO lt_temp_eket-maktx.
MOVE t_eket-matnr TO lt_temp_eket-matnr.
MOVE t_ekes-vbeln TO lt_temp_eket-vbeln.
MOVE t_ekes-vbelp TO lt_temp_eket-vbelp.
APPEND lt_temp_eket.
CLEAR lt_temp_eket.
CLEAR t_ekes.
ENDLOOP.
IF sy-subrc NE 0.
Added by PD 08/08/03
MOVE t_eket-charg TO lt_temp_eket-charg.
addition ends
MOVE t_eket-ebelnDear
Problem No 1 : we are working in a process industries with three plants each of them have three order type. we have define MRP group in "OPPR" then assign each MRP group to Orde types in "OPPE". Now the problem is whn i convert plan order in process order for any material systme automaticaly pick the order type PIi01.
Answer :
1.Please check the OPPR -Plant and MRP group -Select Order Type Button -Check what Order Type you have assinged here ( PI01( May be the default Process Order Type )
2.If you are maintaing MRP group ( 0001 or 0002) , did you asisng the same in MRP1 view ?? because
3.Did you maintain the similar Order type in OPKP -Define Production Scheduling Profile ? -This has highest priority .
4.Did you maintain correct order type in OPJH-Maintain Order Type ??
Refer the expert comments on the same issue : Strategy group to define production order type
Problem No 2: 2nd Problem is system system is not creating plan order for prrevios dates. say i enter PIR for month of november from first november to 30th november and run MRP on 29th the sytem create plan order on 30th of november with exception message 30.
Answer : You can plan the order in back dated , if you maitain Satrt date in the Past optiuon in OPU3/OPU5-Define Scheduling parameters .Goto OPU3 -Select the Order Type -Double click -Maintain 90-60 days in the Start Date in the past in Scheduling Control and Details scheduling tab .
Hope it helps
regards
JH -
Java.util.Date and java.sql.Date
when i am trying to displaying date in my jsp page errors occurs saying that java.util.date and java.sql.date are matching..
i have some sql statements which i need to execute in the page.so i cant delete that import sql statement.
so what is the solution for this.
i want to display the date as 19th april 2003....in the jsp page.
thank uYou should use full names.
java.util.Date date;
java.sql.Date sdate;
..And it may be a good idea to delete one of the two "import" declaration of packages. -
How to display planned movement date and actual movement date together?
Hi, Professionals,
My purpose is to list delayed outbound deliveries.
Anyone could tell me how to display planned movement date and actual movement date?
Appreciate your help.Thanks Shiva.
I tried another way to do it. It works only for a short period of time.
By using VL06O, I list all outbound deliveries by limiting both planned goods movement dates and actual goods movements dates to the same week I would like to inspect. Say both from 7th/11 to 14th/11.
then I list outbound delivery list with planned goods movement date to 7th/11 but left out actual goods movements dates this time.
In excel, I compare those two lists and filter out those unique ones because those unique documents means delayed deliveries which cannot delivery according to planned date.
However, the "delayed" list generated by this method has some noises. Not all of documents are really delayed although most of them do.
I'm also looking for a way to list sales documents number of these delayed delivery documents so i can retrieve order details from it such as order value.
Help still needed. -
The invoice date and the paymant date showing the same
hi sap techies
i am facing a typical problem the invoice date and the payment date is showing the same in fbl5n.the payment terms are set for 30 days that means that the payment date should be 30 days from the invoice date but in fb03 the system shows invoice date and the payment due date to be the same.
please help
kind regardsHi,
Payment terms are calculacted either on
- Document Date
- Posting Date or
- Entry Date
You must have chosen document date in the parameters for payment term and now you must be comparing on posting date.
Check what is the parameter in payment terms.
Also check the payment terms in the document.
Good Luck!
SAP Solutioning -
Diff bet invoice date and Invoices list date
Hello Experts.
Good Morning to all.
1) what is the difference between invoice date and invoicing list dates, please telltheir signigficance and why they needed in customer master billing tab.
2)what is the use of the field Payment guar proced field.what actully is its purpose.
3)Subsequent invoice processing:- It indicates if the invoices for manual
post processing should be printed out.If the business wants to post invoices manually(not
by system automatically) that invoice can be printed out.
In the above sentence what does manual posting means and what is automatic posting means?
And tell me is there will be any need for this field in the real time , if so , then in which case?
Thank you for all the replies..Dear SD Beginner,
These fields will be used to assign the calendars that determines the schedule of billing dates and invoice list for the customer.
Invoice dates (calendar identification)
Identifies the calendar that determines the schedule of billing dates for the customer.
Use
If, for example, a customer wants to consolidate the invoices you send out, you can predefine the billing schedule in a calendar in the system. During billing, the system automatically proposes the appropriate billing date from the calendar.
Procedure
The system proposes the billing schedule from the customer master record of the payer. You can change the value manually in the sales document.
Invoice list Dates (calendar identification)
Identifies the customer's factory calendar that is used during the processing of invoice lists.
Use
An invoice list is a list of invoices (single or collective) that you create for the customer either periodically or on predefined dates. The periods and dates are defined in the customer's factory calendar. Typically, the recipient of an invoice list takes on the responsibility for collecting payments from numerous individual customers and receives a factoring or del credere discount for the service.
Procedure
If you want to create invoice lists for the customer, you must enter an identifier for a predefined factory calendar.
Requirements
You must first define a factory calendar for the customer either in Customizing for Sales or as part of the master data for Sales (Menu path: Logistics -> Sales & distribution -> Master data -> Others -> Billing schedules).
I hope this will help you,
Regards,
Murali. -
Process Order Basic Finish Date and Scheduled Finish Date
Folks,
I have a requirement from the business to be able to update the Process Order Basic Finish Date and Scheduled Finish Date independently from each other.
In other words, update the Basic Finish Date and the Scheduled Finish Date cannot change or update the Scheduled Finish Date and the Basic Finish Date cannot change.
I believe the reason for this is to be able to use the Basic Date to maintain the ATP accurately and keep the Scheduled Date to mark when the order was originally due from the shop floor to be able to measure if orders are being completed on time or late.
I have worked in tnx OPUZ and had some success with other issues with these dates but I can't seem to make them work independently from each other.
Or does anyone have any ideas how to measure proces order performance to the production schedule?
Thank you for your help,
GregRajesha, thank you for your reply but it doesn't solve my problem.
Let me restate my scenario:
I start a process order and both the basic and scheduled finish dates are the same, June 1.
At some point, shop floor tells me they will be late and cannot deliver until June 15.
I need to update a date in the system so the ATP and the MRP planning runs have correct information for promising customers, I will update the Basic Finish date with June 15.
I also need to keep the original June 1 date in order to measure the shop floor performance to the production schedule to measure how early or late the order was delivered. How can I keep the original finish date or how can I measure if a process order is early or late??
Thank you for your help,
Greg -
Planned Delivery Date and Actual Delivery date.
Hi,
Is there a report in SAP which shows the delivery date of a PO line item and actual GR posting date from PO history in one report?
I need to display the planned delivery date and actual delivery date in one report, preferably in columns next to each other.
Thanks in advance.Hi
To my knowledge there is no such report. You will have to develop this report through ABAP help. You need to pick the planned delivery date from the PO and GR posting date from material document. Both this fields (EEIND & BUDAT) can be viewed in the PO history.
However, challenge will be when you have multiple delivery dates and receipt posting dates are for part quantities.
Regards,
Jagadeesh -
Unable to found Bucket start date and bucket end date in OFSAA 6
Hi,
How to find the Bucket start date and bucket end date in OFSAA 6.
I found following tables to mapped to Dim_Result_Bucket but unable to found columns pointing to Bucket Start Date and Bucket End Date.
Tables:
fsi_income_simulation_buckets
fsi_process_run_history
fsi_time_bucket_master
fsi_lr_irr_buckets_aux
fsi_m_alm_process
Kindly let me know the solution.Hi;
Please check below link which could be helpful for your issue:
https://blogs.oracle.com/ebs/entry/service_contracts_warranty_created_by
Regard
Helios -
Need logic for invoice due date and discount due date uncear
Hi Experts.. am new to ABAP
i had an issue please need some logics for these..
Formatting of the Invoice due dates and Discount due date is unclear e.g 20101109,
Invoice due date and Discount due dates are in correct on 10 and 20 days reminders on missing credit notes for blocked invoices.
<removed by moderator>
Thanks & Regards
Edited by: Thomas Zloch on May 18, 2011 1:55 PMCan you provide more info?
are you talking about BSID open accounts?
if yes, use function module DETERMINE_DUE_DATE.
<removed by moderator>
Edited by: Thomas Zloch on May 18, 2011 2:10 PM - please do not ask for "award" -
Month to Date and Year to Date Scenarios
<b>Dear SAP BI Gurus,
Can anyone please give me guidance how to create a Month to Date and Year To Date Scenarios (Variables perhaps?) for 0SRR_CF_C1? The date is in decimal and not DATE format Im assuming the reason for this is to get the Time variance . Nonetheless, Id like to create a MTD and YTD scenario for reporting.
Much Thanks
Philips Manalaysay</b>Hi,
You should take a look at the blog and doc below.
/people/vikash.agrawal/blog/2006/10/17/enable-trend-reporting-150-by-manipulating-variable-value
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
Regards, -
I just got a new iPhone and i set up iCloud on my girlfriend's account. To change it on settings it says delete account. Will this delete her all her data and back up data for iCloud on her iPhone and iPad? Can i change it without deleting it? Please help.
Delete the account on your phone. This will not delete any data on her phone or iPad, or data stored in iCloud.
Maybe you are looking for
-
How can I get my email to appear in order it was received instead of randomly?
My email used to appear in the order it was received according to date/time. Now it appears randomly with new messages mixed in with old ones.
-
Hanging problem with Oracle JDBC thin driver
Hi. We have an application running on top of WLS 6.1 accessing Oracle 8I with oracle's JDBC thin driver. Under stress testing, it appears to hang sometimes. Thread dump shows that many threads seem to be stuck at the same line of code in JDBC driver
-
ITunes won't recognize iPad mini?
Whenever I plug my iPad mini into my PC, the PC will recognize the iPad mini. I can open folders and view files. But the iPad will NOT open in iTunes. I have no way to sync anything. I've tried restarting the computer and rebooting the iPad. I've als
-
TS3988 my emails keep vanishing on my mac..anyone got a solution
since i moved to icloud my emails on my computer keep vanishing..anyone got a solution?
-
Changer la langue d'un logiciel
Bonjour, Je dois actuellement travailler sur des fichiers faisant référence à des noms d'effets en anglais (et donc incompatibles avec des noms français, et trop nombreux pour les changer un à un). Existe t-il une solution pour faire passer un logici