on 10-07-2007 7:43 PM
Hi Experts,
AM looking to pouplate the <i><b>MKPF-XBLNR field in MB1C</b></i> Tx with Delivery# (actually, SAP populates it with Material Slip value). so, pls. let me know that,
among the follow exits/badis, which is the correct one?
<i><b><b>
Transaction Code - MB1C Other Goods Receipts
Enhancement/ Business Add-in Description
Enhancement
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
MBCF0011 Read from RESB and RKPF for print list in MB26
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0009 Filling the storage location field
MBCF0007 Customer function exit: Updating a reservation
MBCF0006 Customer function for WBS element
MBCF0005 Material document item for goods receipt/issue slip
MBCF0002 Customer function exit: Segment text in material doc. item
Business Add-in
MB_RESERVATION_BADI MB21/MB22: Check and Complete Dialog Data MB_QUAN_CHECK_BADI BAdI: Item Data at Time of Quantity Check
MB_PHYSINV_INTERNAL Connection: Core Inventory and Retail AddOn
MB_MIGO_ITEM_BADI BAdI in MIGO for Changing Item Data
MB_MIGO_BADI BAdI in MIGO for External Detail Subscreens
MB_DOC_BADI_INTERNAL BAdIs when Creating a Material Document (SAP Internal)
MB_DOCUMENT_UPDATE BADI when updating material document: MSEG and MKPF
MB_DOCUMENT_BADI BAdIs when Creating a Material Document MB_CIN_MM07MFB7_QTY Proposal of quantity from Excise invoice in GR
MB_CIN_MM07MFB7 BAdI for India Version exit in include MM07MFB7
MB_CIN_LMBMBU04 posting of gr
MB_CHECK_LINE_BADI BAdI: Check Line Before Copying to the Blocking Tables
ARC_MM_MATBEL_WRITE Archive AddOn-Specific Data for MM_MATBEL
ARC_MM_MATBEL_CHECK Check AddOn-Specific Criteria for MM_MATBEL
MB_BATCH_MASTER Setting of Batch Data at Goods Movement
No.of Exits: 8
No.of BADis: 15
</b> <i></i></b></i>
thanq
Hi
Use the BADI
MB_DOCUMENT_UPDATE
use the same method
in the header you have to fetch the Delivery Number
Use the table MSEG-EBELN and MSEG-EBELP fields and fetch the Delivery number from LIPS by passing these PO and Item to LIPS-VGBEL and VGPOS
and fetch the VBELn and to pass to MKPF-XBLNR
Regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanq,
1) as am new to BADI concept, I wanna clarify,
OK, I open the menthod,
default: <i><b>xmkpf-xblnr = sap_populated_matrl_slip_value</b></i>
Custom: after pulling the Delivery#,
<i><b>xmkpf-xblnr = programmer_populating_delivery_nr</b></i>
Is it correct?
2) In my case, Mvmnt type is Y01 i.e. Goods receipt with out PO, description is,
<i><b>"The post goods issue of the components which are put into a loanset is accompanied by the goods receipt of the loanset material (selected by the user at the start of the process).
These 2 movement cause accounts postings to general Ledger account 123456".</b></i>
So, Culd u clarify, in this case, How to pulll Delivary #?
thanq.
Hi
1) DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
😎 place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in AAA).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for BBB sample program.
AAA
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
BBB
&----
*& Report ZBADI_TEST *
*& *
&----
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
2) Check the table MSEG, in some field the delivery number is there ? check all the fields for a particular GR, based on what reference doc it is getting created, there should be some link with the delivery.
Take the help of a functionla guy in this regard.
Regards
Anji
thanq,
1) <i><b>MB_DOCUMENT_UPDATE - BADI when updating material document: MSEG and MKPF</b></i> : I craeted a new implemenatation for this BADI, and I put the break-point, and executed the MB1C tx, but, the control did not enetr into it/stop by there!!
So, I guess, this is not correct one, sorry, if am wrong!!
2) <i><b>MB_DOCUMENT_BADI BAdIs when Creating a Material Document MB_CIN_MM07MFB7_QTY Proposal of quantity from Excise invoice in GR :</b></i>here the comtrol is entering, but the problem is that, the XMKPF[1]-XBLNR is greayed out i.e. I am unable to change in debug mode.....alomost same error in activating my_implemntation!! for this badi.
3) reg. delivary #:
Actually, this is Y01 mvmnt type i.e. with out PO.
1) Am hving MATNR in my hand,
2) so with this MATNR am pulling all VBELNs from VBAP, 3) and am presenting all these VBELNs in LIKP as VGBELs 4) and with the help of, obtained LIPS-VBELNs, finally
5) am taking the Del# from LIKP, by validating against tcode = v01/v02 & Complete Del as 'X' .
6) 6)sorry, i forget to mention, in btwn I need to look the MSEG-BWART = X01 too!
Is my approach is correct?
So, any idea, pls.
thanq.
Message was edited by:
Srikhar
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.