Vendor batch number in stock transfer
Hi,
Batch management at plant level.
When we transfer the stock from one plant to another plant, the vendor batch number is not getting updated in the receiving batch master record.
In 303,we will send it from one plant to another plant (Stock in transit).
In 305,we will receive it to another plant with different batch number.
How do we know this 305 has been done for 303?
Eg:
303
Material : A
Plant:Phar1
Batch 100
305
Material: A
Plant:Phar2
Batch :200
How do we trace the stock in case we need to resend back to the supplier?
Thanks
Srini
You are facing a classic problem. Given Batch number is unique at Plant level, to maintain the continuity, you should have the same batch number between the two plants. Any specific reason why you don't have it.
Then if there is valid case not to have the same batch number in this scenario, then you should look at making the batch number generation external so that you can prefix/suffix or come up with a way to get the original batch number from the sending plant in the receiving plant batch number.
Recently we had a similar requirement, so we activated batch classifiction and put the orignial batch number as one of the characterisitcs in the batch class. You can also think enabling such functionality..
Similar Messages
-
Inspection type 01 - inspection lot creation based on vendor batch number
Hi Guys,
this topic has been discussed several times here, but I was not able to find a suitable answer for my question.
I am facing the folowing requirement:
I have activated inspection type 01 for a raw material.
I am receiving a firs goods receipt from vendor A with vendor batch number 0001.
The system creates its own goods receipt batch number 0546 based on internal numbering.
A new inspection lot is created.
I am posting a second goods receipt from vendor a with vendor batch 0001.
The system creates a new batch number 0547 based on internal numbering.
A new inspection lot is created.
I do not want to get the second inspection lot, because I received vendor batch 0001 before and I am assuming it has been inspected or is in inspection.
Option 1: Post the second goods receipt against the first internal batch number created.
I am aware of this need at the moment, but a user is not always checking if there is an internal batch with the same vendor received before.
Can I customize the system to create inspection lots based on the fact that the vendor batch number was received before?
Or do I have to use an exit and some ABAP code to get the wanted result?
Thanks for your advice in advance.You need to use one of the enhancements that Do-Wook has suggested. There is no standard SAP way to suppress the inspection based on the vendor batch number.
With the first enhancement you use the system to check for a previously received vendor batch and if one is found, then that batch number is proposed and not the next one from the numbering series. In this case, the lot isn't created than due to the inspection lot control of the inspection type.
With the second enhancement you check the vendor batch number and if it's been received you suppress the inspection lot creation and the stock goes right to unrestricted.
You'll probably need to do one or the other. Myself, I prefer the first enhancement.
Craig -
While creating PO using BAPI_PO_CREATE1 vendor batch number is not comming.
Hi Friends,
I am using BAPI " 'BAPI_PO_CREATE1' to create PO in my report.
The PO's are getting created but i the vendor batch number is not found in the PO.
Where as i am passing the vendor batch number.
bapimepoitem-vendrbatch = '2'.
bapimepoitemx-vendrbatch = 'X'.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = bapimepoheader
poheaderx = bapimepoheaderx
memory_uncomplete = 'X'
IMPORTING
exppurchaseorder = v_po_number
TABLES
return = bapiret2
poitem = bapimepoitem
poitemx = bapimepoitemx
poschedule = bapimeposchedule
poschedulex = bapimeposchedulx.
Commit the transaction
IF v_po_number NE space.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = bapiret2_c.
ENDIF.
Please reply urgently.
Thanks Regards,
Sandipan JenaHi
My answer is pure assumption.
Please check the following OSS notes
Note 758810 - BAPI_PO_CHANGE vendor batch and batch not visible
Note 1230268 - Field Vendor Batch never filled for PO BAPIs
Please take help from BASIS and SAP, before implementing the OSS note
Regards
Madhan D -
how can i update vendor batch number for an existinf PO as bapi_po_chanegs is not working for this requiremtn.
If you have less number of records then you can use BDC.
-
QE72 display vendor batch number
HI,
we would like to see additional to the internal batch number the vendor batch number in the result recording screen (top alv grid).
Currently I started to create the additional output information with imp. enhancements in SAPFQE20. This looks good, and I'm able to get are new line with the vendor batch number description. But I don't have any data to display for the lots.
I checked and found that all inspection lots are stored in structure "G_INSP_LOTS" defined in RQETBI20 as BAPI2045D_IL0. But bad that this structure don't have any vendor batch number. If I check the inspection lot this information is stored in QALS-LICHN.
Strange is, if I check the BADI "InspectionLot" (objecttype BUS2045) there is attribute vendor batch defined. Based on the numbering of the BADI BUS2045 and the defined BAPI2045D_IL0 structure it seems there is a relation but do somebody knows this relation ?
Also function module MAP2E_QALS_TO_BAPI2045D_IL0 that is used to translat WALS information into the BADI structure don't have any hint for LICHN.
Not sure if this is missing implementation. Could this be for such an basic field?
Any ideas, what I can do to display the vendor batch number.
Thanks for your hints on this topic.
JensAnyone having an idea?
We are facing same issue.
Material M00001 with 2 batches XYZ and ZYX.
Batch XYZ has vendor batch set to 0123456
Batch ZYX has vendor batch 33333333.
Now user posts GI with batch XYZ and system automatically changes vendor batch in master record of second batch ZYX and replaces 33333333 with 0123456.
Do you see any logic in it? -
MIGO field selection - vendor batch number
I created a new movement type by copying from the standard SAP movement type 501 (GR w/o purchase order).
When posting a GR with this movement type and a batch-managed material, the Batch field is open for entry but the Vendor Batch field (GOITEM-LICHA) is suppressed. I suppose this is because SAP does not expect you to enter any vendor-related information if you do not have a PO. And similarly if you have vendor-related information (like a vendor's batch number) you should be using a PO.
However the business requires a Vendor Batch number to be entered in this scenario.
Does anyone know how to make the Vendor Batch field open for input when using a specific movement type?
I'm thinking maybe a BADI like MB_MIGO_ITEM_BADI is my only option. I've tried the MIGO field selection (OMJX) but couldn't make this work. Any input would be appreciated.
Thanks!I am afraid I must confirm that, as you have already seen, it is not possible to enter a Vendor Batch (LICHA) in a goods receipt without reference to the purchase order with the movemement types 501, 511 or 561.
There is no standard system setting or program code available which can set this entry as required or optional. This kind of requirement can only be achieved through a software modification,
Also, please notice that although you can enter a Vendor Batch when posting a goods movement with reference to a purchase order, you cannot display it later with transaction MIGO:
Please, kindly check the information contained under the attached note regarding this matter:
330585 - MIGO: Vendor batch in material document display.
As stated in this note, under the 'System response after the note is implemented' section:
"After the attached correction instructions are implemented, the field
can no longer be seen in the display of the material document for the
vendor batch using Transaction MIGO. Displaying the vendor batch does
not make much sense since it might have changed since the posting of
the material document. The material document itself does not have the
information of the vendor batch that was entered at that time. In the
system, only the information of the current vendor batch exists for
the batch."
Sorry not having a positive answer ! =/
Plauto -
Hi All
The Vendor Batch ( MCHA-LICHA) Number field is of 15 characters in MIGO transaction, where as we receive many material with batch numbers more than 15 characters.
What is the possibility of extending the length of this field.
Kind Regards
SamsonDear Gabriel,
Can you brief how did you resolve your issue, I am facing the same issue with my client.
Regards
Vivek Kumar -
Batch determination in stock transfer
Dear All,
in my scenario, stock is transfer from one plant to another by shelf life expiration date, for that what setting should i do and where the batch procedure should i maintained?
please help me out, points will be rewarded.
thanks
Pravindear sir,
i have done batch determination for same material for simple sales
order. but now i want to transfer posting of same material to depot,
which was the delivery against the purchase order. for that how and
where i should assign search procedure.
regards
Pravin -
Copy batch in stock transfer order to receiving batch
Hi experts,
I would like to know how to copy batch number in stock transfer order to the receiving batch in material document which generated when post goods issue. Is there any user exits I can carry out? Many thanks in advance.Dear,
Kindly enter batch in STO after storage Location column in every line which you enter in STO. then you can create delivery batch no automatically comes in delivery. There are no require to split batch in delivery.
Hope it will help you.
Regards,
Sandip -
Intra-Company Stock Transfer PO is requiring vendor inv to bill customer
I am trying to configure a process where a new item category on a sales order will trigger a purchase requisition (new req type) to create a UB purchase order. When I deliver the PO from the supplying plant, then do the goods receipt in the receiving plant, then deliver and PGI the delivery for the sales order, I cannot invoice the customer because I get the error message 0141 Vendor Invoice has not yet been created (Individual Purchase Order). I don't think I should need to create a vendor invoice for a stock transfer between 2 plants in the same company code, and when I try I get a message that no suitable item is found for the purchase order.
Can any of you experts tell me what determines whether or not a vendor invoice is required, and why I'm getting the message that one is required?
REGARDS,Yes, that is correct. The delivery from the stock transport PO supplying plant->receiving plant is NL and the item category is NLN. The delivery from the receiving plant to the end customer is type LF. It is that delivery to the customer I am trying to bill.
Regards, -
Automatically create vendor batches from DESADV
Hello gurus,
we receive DESADV Idocs that automatically create inbound deliveries in our SAP system.
When the vendor sends a batch number, it is correctly transmitted into field u201Cvendor batchu201D (LIPS-LICHN). Field u201Cbatchu201D (LIPS-CHARG) is empty.
Now we would like to use the vendoru2019s batches in our system.
Example: We do not have any stock or batch information of a certain material. Now we order 10 pieces of that material and the vendor sends a DESADV containing batch information for the goods to be delivered (vendor batch number is 1234).
Now, we would like to have the system create a batch automatically and post the material to that batch on GR. The number of the batch may be automatically created, but the vendor batch number (1234) must be visible in the batch master record.
Is there a standard way to do this (in plain MM, without LE)?
Cheers
AliciaHello Alica Moore,
The batch management is controlling the inventory at your location level only ( like plant / co. co / material ). The batch which is sending by your vendor / customer, that can be used if the manual batch is using. If the system is using automatic batch management , than the sytem auto batch only updated in your inventory system and the batch is given by your vendor would be optional entry.
I think this can be achived with making your system as manual batch entry which would be used as vendor batch number in your system.
Pavan -
Automatic batch number in migo_tr with movement type 301
Hi!
I am trying to do a transfer from a plant to another with MIGO_TR movement type 301.
The thing is that I must enter manually the batch number in the destination plant.
Is there a possibilty to configure the system in order to copy in batch number field for destination plant the same batch number entered in the plant from where I want to transfer?
Thanks!your system does not work like designed
please read this very old but release independend OSS note 555 - Batch treatment during stock transfer and transfer posting:
Key word: Transfer batch
If you enter materials for stock transfers or transfer postings with movement types 301 to 316 via collective processing and in this case enter the batch number for materials to be handled in batches, the system automatically sets 'Receiving batch' equal to 'Issuing batch'.
Additional key words
Cause and prerequisites
The collective processing screen does not provide space for an additional transfer batch in the two lines provided for a material movement.
Solution
During the stock transfer of material, the batch is usually retained. If you want to change the batch number, you have to enter the item in question step by step (F8=New item). -
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 -
Vendor batch is retrieved from LIPS-LICHN only if LIPS-LICHN is not blank,
(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)
REQUIREMENT:
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)
t-lips is the internal 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.
Following is the piece of code:
*& Form f_collect_final
Routine to collect all the display data into the final internal
table t_display.
FORM f_collect_final.
DATA: l_std_pac_no LIKE eket-menge,
l_std_pac_no_out(13) TYPE p,
l_tot_std_pt(13) TYPE c,
l_rmdr(13) TYPE n,
l_qtnt(13) TYPE n,
l_tabix TYPE i.
LOOP AT t_eket.
t_display-ebeln = t_eket-ebeln.
t_display-ebelp = t_eket-ebelp.
t_display-etens = t_eket-etens.
t_display-eindt = t_eket-eindt.
t_display-menge = t_eket-menge.
t_display-meins = t_eket-meins.
t_display-matnr = t_eket-matnr.
mod begin CR1591
t_display-maktx = t_eket-maktx.
READ TABLE t_makt WITH KEY matnr = t_eket-matnr
BINARY SEARCH.
IF sy-subrc = 0.
t_display-maktx = t_makt-maktx.
ENDIF.
mod end CR1591
t_display-vpnam = t_eket-vpnam.
t_display-lifnr = t_eket-lifnr.
t_display-charg = t_eket-charg.
READ TABLE t_mlgn WITH KEY matnr = t_eket-matnr
BINARY SEARCH.
IF sy-subrc = 0.
t_display-lhmg1 = t_mlgn-lhmg1.
t_display-lhme1 = t_mlgn-lhme1.
t_display-lety1 = t_mlgn-lety1.
t_display-ltkze = t_mlgn-ltkze.
ENDIF.
READ TABLE t_marm WITH KEY matnr = t_eket-matnr
BINARY SEARCH.
IF sy-subrc = 0.
t_display-umrez = t_marm-umrez.
t_display-meinh = t_eket-meins.
ENDIF.
READ TABLE t_marc WITH KEY matnr = t_eket-matnr
BINARY SEARCH.
IF sy-subrc = 0.
t_display-zzjp_nyu_sop = t_marc-zzjp_nyu_sop.
t_display-zzjp_dos_frm = t_marc-zzjp_dos_frm.
t_display-zzjp_aprn = t_marc-zzjp_aprn.
t_display-zzjp_re1 = t_marc-zzjp_re1.
ENDIF.
READ TABLE t_lfa1 WITH KEY lifnr = t_eket-lifnr
BINARY SEARCH.
IF sy-subrc = 0.
t_display-name1 = t_lfa1-name1.
ENDIF.
READ TABLE t_lips WITH KEY vbeln = t_eket-vbeln
posnr = t_eket-vbelp
BINARY SEARCH.
l_tabix = sy-tabix.
IF sy-subrc = 0.
t_display-charg = t_lips-charg.(I think this is the place to change).
t_display-lichn = t_lips-charg.
ENDIF.
I have tried with the following code, but it is not working.
IF sy-subrc = 0.
t_display-charg = t_lips-charg.
IF not t_lips-lichn is initial.
t_display-lichn = t_lips-lichn.
ELSE.
t_display-lichn = t_lips-charg.
ENDIF.
ENDIF.Hi,
Find the modification below, consider the bold text and remove the old one:
READ TABLE t_lips WITH KEY vbeln = t_eket-vbeln
posnr = t_eket-vbelp
BINARY SEARCH.
l_tabix = sy-tabix.
IF sy-subrc = 0.
<b>if t_lips-lichn EQ space AND
t_lips-charg NE space.
t_display-charg = t_lips-charg.
t_display-lichn = t_lips-charg.
endif.</b>
<i>t_display-charg = t_lips-charg.(I think this is the place to change).
t_display-lichn = t_lips-charg.</i>ENDIF. -
Hi There,
Please guide me how can I control the Vendor Batch used in MIGO
transaction.
Requirement is that when we do MIGO ,there are two batch entry fields one
is Batch and another Vendor Batch. Now the field Batch is used as an
internal generated batch and the filed Vendor Batch is the input filed
of actual vendor batch.
Now the problem is that I want to have a control over this vendor batch,
i.e. If once one vendor batch number is rejected then next time MIGO with
the same batch number should not be allowed by the system.
Can we have some kind of control in this in std SAP or do we have to use some exits......
Thanks & Regards
KaushikHi Kaushik,
One way of solving this can be by activating the below user exit
Enhancement - MBCF0002
Function Module - EXIT_SAPMM07M_001
This will get triggered before the save.
So you can try with this exit.
Cheers
Alfred
Maybe you are looking for
-
Urgent!!! - output type
What do u mean by..... The invoice program for output type ZD06(YVRxxxxx) ....
-
What API or package can I use to parse an HTML page and to obtain HTML DOM interfaces.
-
an update was sent to my wife's computer. she tried to use it ,but it would not open. the older version worked fine ,but it was erased by the upgrade. How do we get the old version back? the upgrade--yahoo_firefox_3.6_set_us.dmg-firefox will not open
-
Hi Experts, I have a standalone AP 1242AG with IOS Version 12.4(21a)JA1 configured with WPA v2 and AES encryption and would like see Client Names when i use the CLI command "#sh dot11 associations client". Currently my command output is only showing
-
How to parse this kind of XML documents and store in a relational tables
Can u guys help me out ,..how to parse these kind of XML documents..like under PR there Sr,CreationDate and DoBID.. Again under Sr...there are LD, CID,TID, RID and so on..... so how to parse this kind of data..how to create the structure of the table