MEPO1320 - OBMNG
Masters!!
Im having a hard time to find the transparent table of field obmng(open quantity)
Could you advise me on what field should I need to use in replace with obmng and what table it is included?
Im currently joining a table in sq02 and the field obmng is in structered table w/c is not allowed. Hope you guys can help me...
Awards again..
thnx tnx
Hi Selma
OBMNH is not stored, but calculated by the system at runtime using the entries of table EKBE.
There should be a function module that does this.
Similar Messages
-
Hi Guys,
I am working in fresh implementaiton. I have got few reqmts from PP people. I have collated the tables and fields for 11 reports in PP/ Can any one suggest how togo about. Business content is of no help....
Any thoughts how to go !!!
Ponits are waiting !!!
Following are the tables and fields
Tables Fields
A363 LIFNR
AFPO DAUAT
AFRUD GRUND
AFRUD ISM01
AFRUD ISM02
AFRUD ismo1+iam02
CAUFVD GWEMG
CE1MASS PERIO
GOHEAD BLDAT
GOHEAD XABLN
IOMAMO BUDAT
J_1IEXCDTL WERKS
J_1IEXCDTL MENGE
J_1IEXCHDR EXDAT
J_1IEXCHDR KUNAG
KNA1 REGIO
KNA1 NAME1
KONV KWERT
LFA1 NAME1
LIKP TRAID
MAKT MAKTX
MARA SPART
MARA MEINS
marc EKGRP
MARD UMLME
MBEW SALKV
MDEZ MNG01
MEPO_TOPLINE BSART
MEPO_TOPLINE BEDAT
MEPO1211 MENGE
MEPO1320 OBMNG
MSEG BWART
RMMG1 MTART
RMMG1 MATNR
RMMG1 WERKS
RMMG3 LABST
RV45A KETDAT
S001 KUNNR
S001 REMENGE
S021 AUFNR
S021 SPTAG
S021Z PSMNG
S026 ENMNG
SYST LISEL
T157B FTEXT
VBAK BSTDK
VBAK VBELN
VBAK KUNNR
VBEP MBDAT
VBKD BSTKD
VTTK TDLNR
ZNRGP RRGP
ZNRGP DOCNO
ZNRGP DOCDT
ZRGP REQBY
ZRGP DADD1
ZRGP RSEND
ZRGP ZXDAT
zrmd OPNSTKHi,
You have to decomposite these fields into several functional groups. Then you need to figure out how to link these groups together, through which field(s). Simultaneously you have to find out the structure of infoproviders you'll create. Logically model these infoproviders to understand if their structure will allow you to meet reporting needs.
After that you may create several generic datasources based on table or view. Probably you'll have to write several user exits.
Create infosources, data targets etc.
Best regards,
Eugene -
How can I find This field in what table OBMNG (Open quantity) Tcode Me23n
hello,
I need to find this field in a table and not in a structure because I am doing an extract. The structure that has this field is MEPO1320, but i cant pull data from it. I tried st05, where used in and i could not find it, can someone help? please.Hi,
Go To the structure in SE11 and put the cursor on the required field and try a where used list.In the selection criteria check the checkbox Tables and continue.If not for the field chk for the data element.
Regards,
Lakshman. -
Make Non-editable Column in Table Control of ME21N and ME22N
Hi Experts,
I was trying to look for a solution to make the columns for field MEPO1320-SLFDT(Stat Deliv. Date), MEPO1320-EEIND (Deliv. Date) and MEPO1211-NETPR (Net Price) from transaction ME21N and ME22N to be non-editable ONLY when Qty Received (MEPO1320-WEMNG) > 0.
I'd found that the modify screen codes were located at Class CL_TABLE_VIEW_MM, Method MODIFY_SCREEN_TC_LINE but there were no enhancement spots available to add my code. Is there any other method i can use to make those fields non-editable?
Thanks in advance!
Cheers,
Cheng
Edited by: Cheng Mei Tan on Jun 4, 2009 9:31 AMHi Cheng,
I think you can use this BAdi: ME_PROCESS_PO_CUST - Enhance Processing of Enjoy Purchase Order.
Use the method PROCESS_ITEM to control the fields at the item level.
I think is not possible to make the fields non-editable, however, you can put an error message whenever your condition is verified, and the user won't be able to change the fields.
Cheers,
Pedro -
Hi all,
I wana pass multiple line items thru bdc me21n....can any1 please help me .if u guys have some code can mail me at [email protected] will be rewarded.
my code below is not working for passing multiple items.
report y1_po_test
no standard page heading line-size 255.
tables: mara,
lfa1,
eina,
eine,
eban,
zdrgsah, zdrgsap,
zdrgsup,
t100,
ekko,
a004, zprice_grpsal, mvke.
*Internal Table to get the input Data
data: begin of i_input occurs 0,
matnr like ekpo-matnr,
asqty like ekpo-menge,
ebeln like ekpo-ebeln,
posnr(5),
posnr like zdrgsap-posnr,
invno like zdrgsap-invno,
invdt like zdrgsah-invdt,
netpr like zdrgsap-netpr,
cntno like zdrgsap-cntno,
shcnm like zdrgsah-shcnm,
apcno like zdrgsap-apcno,
spcno like zdrgsap-spcno,
werks like ekpo-werks,
lgort like ekpo-lgort,
matkl like ekpo-matkl,
pack(10),
mvgr2 like mvke-mvgr2,
dpric type p decimals 6 ,
gpric type p decimals 6,
end of i_input.
data: begin of i_inputxt occurs 0,
matnr(18) ,
asqty(13) ,
ebeln(10) ,
posnr(6) ,
invno(10) ,
invdt(8) ,
netpr(11) ,
cntno(11) ,
shcnm(10) ,
werks(4) ,
lgort(4) ,
matkl(9) ,
pack(10),
end of i_inputxt.
data: begin of i_error occurs 0,
prnum like eban-banfn,
pritm like eban-bnfpo,
inmat like mara-matnr,
prmat like mara-matnr,
asqty like zdrgsap-asqty,
prqty like eban-menge,
remak(100),
remark(255) type c,
end of i_error.
data : begin of i_error1 occurs 0,
prnum like eban-banfn,
pritm like eban-bnfpo,
asqty like zdrgsap-asqty,
prqty like eban-menge,
remak(100),
end of i_error1.
data : begin of i_zsap occurs 0,
ebeln like zdrgsap-ebeln,
posnr(5),
menge like zdrgsap-menge,
asqty like zdrgsap-asqty,
end of i_zsap.
data : v_ebeln like eket-ebeln.
data : begin of i_a004 occurs 0,
matnr like a004-matnr,
knumh like a004-knumh,
kbetr like konp-kbetr,
end of i_a004,
i_a0041 like i_a004 occurs 0 with header line.
data : begin of i_konp occurs 0,
knumh like konp-knumh,
kbetr like konp-kbetr,
konwa like konp-konwa,
end of i_konp.
data : begin of i_konp1 occurs 0,
knumh like konp-knumh,
kbetr like konp-kbetr,
konwa like konp-konwa,
end of i_konp1.
data : begin of i_netpr occurs 0,
ebeln like eket-ebeln,
ebelp like eket-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
netpr like ekpo-netpr,
kbetr like konp-kbetr,
end of i_netpr.
data : begin of i_grpsal occurs 0,
pcode like zprice_grpsal-pcode,
fact like zprice_grpsal-fact,
wfact like zprice_grpsal-wfact,
end of i_grpsal.
data : begin of i_domsal occurs 0,
pcode like zprice_grpsal-pcode,
fact like zprice_grpsal-fact,
wfact like zprice_grpsal-wfact,
end of i_domsal.
data : begin of i_zsap1 occurs 0,
ebeln like zdrgsap-ebeln,
posnr(5),
asqty like zdrgsap-asqty,
end of i_zsap1.
data: begin of bdcdata occurs 0.
include structure bdcdata. " Batch input: New table field
data: end of bdcdata.
messages of call transaction
data: messtab like bdcmsgcoll occurs 0 with header line.
data: i_mara type mara occurs 0 with header line,
i_eina like eina occurs 0 with header line,
i_eine like eine occurs 0 with header line.
data : begin of i_inferr occurs 0,
matnr like eina-matnr,
infnr like eina-infnr,
werks like eine-werks,
end of i_inferr.
data : begin of i_inferrc occurs 0,
matnr like eina-matnr,
end of i_inferrc.
*Data declaration.
data: v_file type string, " Variable for uploading file
v_item(5) type c, " Line item number
v_itno(2) type n,
p_wkurs like zdrgkurs-wkurs,
v_matnr(20) type c,
v_menge(20) type c,
v_banfn(20) type c,
v_bnfpo(20) type c,
v_bednr(20) type c,
v_werks(20),
p_lifnr(10) ,
v_flag,
p_lifnrtxt(10),
p_wkurstxt(9),
p_bsartxt(4),
v_posnr(5), n type i,
v_quant(13),
v_asqty(13),
v_prqty(13),
v_apcno(6),
v_spcno(4),
v_itm(11),
v_cnt type i,
v_cntno(4),
v_pack(10),
v_order(15),
v_lifnr(10),
v_invdt like sy-datum,
v_waers like ekko-waers,
v_podat like ekko-bedat,
v_docdt1 like sy-datum,
v_docdt(10),
v_fnam(132).
data : begin of i_test occurs 0,
bnfpo like eban-bnfpo,
matnr like eban-matnr,
menge like eban-menge,
bsmng like eban-bsmng,
end of i_test.
data : begin of i_mvke occurs 0,
matnr like mvke-matnr,
mvgr2 like mvke-mvgr2,
end of i_mvke.
data : begin of i_invno,
ebeln like ekko-ebeln,
angnr like ekko-angnr,
end of i_invno.
data : i_final like zinvdiff occurs 0 with header line.
Constants
constants : c_pd01 like eine-werks value 'PD01'.
*Selection Screen Declarations
selection-screen begin of block b1 with frame title text-010.
parameters: p_invno like zdrgsah-invno obligatory,
p_bsart like ekko-bsart obligatory.
selection-screen end of block b1.
start-of-selection.
To Upload the data into Internal table.
perform f_upload_data.
To Validate the input data.
perform f_check_data.
if i_error[] is not initial or i_error1[] is not initial.
To display the error message
perform f_display_errors.
else.
To create PO
perform f_process_session.
endif.
perform f_check_calc_price.
perform f_display_data.
perform f_update_zinvdiff.
*& Form f_get_filename
text
form f_get_filename.
endform. " F_get_filename
*& Form f_upload_data
form f_upload_data .
select matwa as matnr asqty ebeln posnr b~invno invdt netpr cntno
shcnm apcno spcno into table i_input
from zdrgsah as a join zdrgsap as b on
a~invno = b~invno
where b~invno eq p_invno.
select ebeln
posnr
menge
asqty
from zdrgsap into table i_zsap
where invno = p_invno.
loop at i_zsap.
concatenate i_zsap-posnr(4) '0' into v_posnr.
i_zsap1-ebeln = i_zsap-ebeln.
i_zsap1-posnr = v_posnr.
i_zsap1-asqty = i_zsap-asqty.
collect i_zsap1.
clear i_zsap1.
endloop.
delete adjacent duplicates from i_zsap comparing posnr menge .
delete adjacent duplicates from i_input comparing ebeln posnr.
loop at i_input.
p_werks = i_input-werks.
v_invdt = i_input-invdt.
call function 'CONVERT_DATE_FORMAT'
exporting
i_date = v_invdt
importing
e_calc_date = v_invdt.
if i_input-apcno is initial.
v_apcno = '0000'.
else.
v_apcno = i_input-apcno.
endif.
if i_input-spcno is initial.
v_spcno = '0000'.
else.
v_spcno = i_input-spcno.
endif.
if i_input-cntno is initial.
i_input-cntno = '0000'.
endif.
concatenate v_apcno v_spcno into i_input-pack.
concatenate v_pack v_cntno into v_order separated by '-'.
i_input-order = v_order.
clear : v_itm, v_cnt, v_cntno, v_pack, v_apcno, v_spcno, v_order.
concatenate i_input-posnr(4) '0' into v_posnr.
select single lifnr into p_lifnr from zdrgsup
where shcnm = i_input-shcnm.
v_lifnr = p_lifnr.
if sy-subrc <> 0.
message e000(zcnc) with text-002.
endif.
select single * from eban
where banfn eq i_input-ebeln
and bnfpo eq v_posnr.
if sy-subrc eq 0.
move eban-werks to i_input-werks.
move eban-lgort to i_input-lgort.
move eban-matkl to i_input-matkl.
move eban-bnfpo to i_test-bnfpo.
move eban-matnr to i_test-matnr.
move eban-menge to i_test-menge.
move eban-bsmng to i_test-bsmng.
modify i_input.
if not i_input-matnr eq i_test-matnr.
move i_input-ebeln to i_error-prnum.
move v_posnr to i_error-pritm.
move i_input-matnr to i_error-inmat.
move eban-matnr to i_error-prmat.
i_error-remak = 'Material does not match'.
append i_error.
clear i_error.
endif.
v_quant = i_test-menge - i_test-bsmng.
read table i_zsap1 with key ebeln = i_input-ebeln posnr = v_posnr.
if not i_zsap1-asqty <= v_quant.
move i_input-ebeln to i_error1-prnum.
move i_zsap1-posnr to i_error1-pritm.
move i_zsap1-asqty to i_error1-asqty.
move eban-menge to i_error1-prqty.
move v_quant to i_error1-prqty.
i_error1-remak = 'Material Quantity does not match'.
append i_error1.
clear i_error1.
endif.
select single matnr infnr from eina
into corresponding fields of i_eina
where matnr eq i_input-matnr
and lifnr eq p_lifnr.
if sy-subrc = 0.
append i_eina.
check not i_eina[] is initial.
select single * from eine
into i_eine
where infnr eq i_eina-infnr
and werks eq eban-werks.
if sy-subrc <> 0.
move i_input-matnr to i_inferr-matnr.
move i_eina-infnr to i_inferr-infnr.
move eban-werks to i_inferr-werks.
append i_inferr.
clear i_inferr.
endif.
else.
move i_input-matnr to i_inferrc-matnr.
append i_inferrc.
clear i_inferrc.
endif.
clear : i_eina, i_eine.
clear : i_zsap, i_zsap1, i_input, v_posnr,
v_quant, i_test.
endif.
endloop.
delete adjacent duplicates from i_error1 comparing prnum pritm.
perform chk_info_rec.
endform. " f_upload_data
*& Form f_check_data
form f_check_data .
if not i_input[] is initial.
select * from mara
into table i_mara
for all entries in i_input
where matnr eq i_input-matnr.
endif.
loop at i_mara.
read table i_input with key matnr = i_mara-matnr.
if sy-subrc <> 0.
write : 'Following Part Numbers are not found in MARA'.
write : / i_input-matnr.
endif.
endloop.
if i_mara[] is initial.
loop at i_input.
format color col_heading intensified off.
write : 'Following Part Numbers are not found in MARA'.
format color col_normal intensified off.
write : / i_input-matnr.
endloop.
endif.
select single wkurs into p_wkurs from zdrgkurs
where invno = p_invno.
if sy-subrc ne 0.
message e000(zcnc) with text-s11.
endif.
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = p_lifnr
importing
output = p_lifnr.
p_lifnrtxt = p_lifnr.
p_wkurstxt = p_wkurs.
p_bsartxt = p_bsart.
loop at i_input.
move-corresponding i_input to i_inputxt.
append i_inputxt.
endloop.
select single ebeln
angnr from ekko
into i_invno
where angnr = p_invno.
if sy-subrc = 0.
perform display_err.
endif.
endform. " f_check_data
*& Form f_process_session
text
form f_process_session.
v_docdt1 = sy-datum.
write v_docdt1 to v_docdt using edit mask '__.__.____'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=MEDOCTYPE'.
perform bdc_field using 'BDC_CURSOR'
'MEPO_TOPLINE-BSART'.
perform bdc_field using 'MEPO_TOPLINE-BSART'
p_bsartxt.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
p_lifnrtxt.
perform bdc_field using 'BDC_CURSOR'
'MEPO1222-BUKRS'.
perform bdc_field using 'MEPO1222-EKORG'
'SBAP'.
perform bdc_field using 'MEPO1222-EKGRP'
'PG1'.
perform bdc_field using 'MEPO1222-BUKRS'
'SBA'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=TABHDT2'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MEPO_TOPLINE-BSART'
p_bsartxt.
perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
p_lifnrtxt.
********************conditions***************************************
perform bdc_field using 'BDC_CURSOR'
'KOMV-KSCHL(08)'.
perform bdc_field using 'KOMV-KSCHL(07)'
'zot1'.
perform bdc_field using 'KOMV-KSCHL(08)'
'zinc'.
perform bdc_field using 'KOMV-KSCHL(09)'
'ziv1'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=V69A_KOAN'.
perform bdc_field using 'BDC_CURSOR'
'KOMV-KSCHL(01)'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KOMV-KSCHL(02)'
'zca1'.
perform bdc_field using 'KOMV-KSCHL(03)'
'zfa1'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=TABHDT7'.
perform bdc_field using 'BDC_CURSOR'
'KOMV-KSCHL(09)'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MEPO1229-IHRAN'.
perform bdc_field using 'MEPO1229-ANGNR'
p_invno.
perform bdc_field using 'MEPO1229-IHRAN'
v_invdt.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=MEV4001BUTTON'.
perform bdc_field using 'BDC_CURSOR'
'MEPO1229-IHRAN'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=MEV4000BUTTON'.
perform bdc_field using 'BDC_CURSOR'
'MEPO1229-IHRAN'.
perform bdc_field using 'DYN_6000-LIST'
' 1'.
loop at i_inputxt.
concatenate i_inputxt-posnr(4) '0' into v_posnr.
concatenate 'MEPO1211-EMATN(' v_itno ')' into v_matnr.
concatenate 'MEPO1211-MENGE(' v_itno ')' into v_menge.
concatenate 'MEPO1211-BANFN(' v_itno ')' into v_banfn.
concatenate 'MEPO1211-BNFPO(' v_itno ')' into v_bnfpo.
concatenate 'MEPO1211-BEDNR(' v_itno ')' into v_bednr.
concatenate 'MEPO1211-WERKS(' v_itno ')' into v_werks.
v_item = v_item + 10.
endif.
v_itno = v_itno + 1.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
v_matnr.
perform bdc_field using v_matnr "'MEPO1211-EMATN(01)'
i_inputxt-matnr.
perform bdc_field using v_menge "'MEPO1211-MENGE(01)'
i_inputxt-asqty.
perform bdc_field using v_banfn "'MEPO1211-BANFN(01)'
i_inputxt-ebeln.
perform bdc_field using v_bnfpo "'MEPO1211-BNFPO(01)'
i_inputxt-posnr.
perform bdc_field using 'DYN_6000-LIST'
v_itno.
loop at i_inputxt .
v_itno = sy-tabix.
clear v_fnam.
concatenate 'MEPO1211-EMATN(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-matnr.
clear v_fnam.
concatenate 'MEPO1211-MENGE(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-asqty.
clear v_fnam.
concatenate 'MEPO1211-BANFN(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-ebeln.
clear v_fnam.
concatenate 'MEPO1211-BNFPO(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-posnr.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
endloop.
loop at i_inputxt from 6.
v_itno = sy-tabix.
clear v_fnam.
concatenate 'MEPO1211-EMATN(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-matnr.
clear v_fnam.
concatenate 'MEPO1211-MENGE(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-asqty.
clear v_fnam.
concatenate 'MEPO1211-BANFN(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-ebeln.
clear v_fnam.
concatenate 'MEPO1211-BNFPO(' v_itno ')' into v_fnam.
perform bdc_field using v_fnam
i_inputxt-posnr.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
endloop.
perform bdc_field using 'BDC_CURSOR'
'MEPO1320-SLFDT(01)'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=TABHDT2'.
perform bdc_field using 'DYN_6000-LIST'
' 2'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=V69A_KOAK'.
perform bdc_field using 'BDC_CURSOR'
'KOMV-KBETR(05)'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=MECHECKDOC'.
perform bdc_field using 'BDC_CURSOR'
'KOMV-KSCHL(01)'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'04/03'.
perform bdc_field using 'BDC_OKCODE'
'=&ONT'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=MEV4000BUTTON'.
perform bdc_field using 'BDC_CURSOR'
'MEPO_TOPLINE-BSART'.
perform bdc_field using 'DYN_6000-LIST'
' 2'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'KOMV-KBETR(08)'.
perform bdc_field using 'KOMV-KBETR(03)'
' .54'.
perform bdc_field using 'KOMV-KBETR(08)'
' .54'.
perform bdc_dynpro using 'SAPLMEGUI' '0014'.
perform bdc_field using 'BDC_OKCODE'
'=MESAVE'.
perform bdc_field using 'BDC_CURSOR'
'MEPO1211-NETPR(01)'.
perform bdc_transaction using 'ME21N'.
endform. "f_process_session
*& Form bdc_transaction
text
-->P_0464 text
form bdc_transaction using tcode.
data: l_mstring(480).
data: l_subrc like sy-subrc.
data: v_mode type c.
v_mode = 'A'.
refresh messtab.
call transaction tcode using bdcdata
mode v_mode
update 'S'
messages into messtab.
l_subrc = sy-subrc.
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
loop at messtab.
select single * from t100 where sprsl = messtab-msgspra
and arbgb = messtab-msgid
and msgnr = messtab-msgnr.
if sy-subrc = 0.
l_mstring = t100-text.
if l_mstring cs '&1'.
replace '&1' with messtab-msgv1 into l_mstring.
replace '&2' with messtab-msgv2 into l_mstring.
replace '&3' with messtab-msgv3 into l_mstring.
replace '&4' with messtab-msgv4 into l_mstring.
else.
replace '&' with messtab-msgv1 into l_mstring.
replace '&' with messtab-msgv2 into l_mstring.
replace '&' with messtab-msgv3 into l_mstring.
replace '&' with messtab-msgv4 into l_mstring.
endif.
condense l_mstring.
if messtab-msgtyp eq 'E' or messtab-msgtyp eq 'W'.
write: / messtab-msgtyp, l_mstring(250).
endif.
search l_mstring for 'SEA'.
if sy-subrc = 0.
write: / messtab-msgtyp, l_mstring(250).
endif.
else.
write: / messtab.
endif.
endloop.
endform. " bdc_transaction
Start new screen *
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform. "BDC_DYNPRO
Insert field *
form bdc_field using fnam fval.
if fval <> space.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endif.
endform. "BDC_FIELD
*& Form f_display_errors
form f_display_errors .
if i_error[] is not initial.
format color col_heading intensified off.
uline .
write :/ 'PR No ',
(10) 'Item No',
(20) 'PR Part No',
(30) 'Invoiced Part No',
(60) 'Remark'.
uline .
loop at i_error.
perform f_display_color.
write :/ i_error-prnum,
(10) i_error-pritm ,
(20) i_error-prmat,
(30) i_error-inmat,
(60) i_error-remak.
clear i_error.
endloop.
endif.
if i_error1[] is not initial.
format color col_heading intensified off.
uline .
write :/ 'PR No ',
(10) 'Item No',
(20) 'PR Quantity',
(30) 'Invoiced Quantity',
(60) 'Remark'.
uline .
loop at i_error1.
perform f_display_color.
if not i_error1-asqty is initial.
v_asqty = i_error1-asqty .
v_prqty = i_error1-prqty.
write :/ i_error1-prnum,
(10) i_error1-pritm ,
(20) v_prqty,
(30) v_asqty,
(60) i_error1-remak.
clear : v_asqty, v_prqty.
endif.
clear i_error1.
endloop.
endif.
endform. " f_display_errors
*& Form f_display_color
form f_display_color .
if v_flag = 0.
format color col_normal intensified on.
v_flag = 1.
elseif v_flag = 1.
format color col_normal intensified off.
v_flag = 0.
endif.
endform. " f_display_color
*& Form display_err
text
--> p1 text
<-- p2 text
form display_err .
format color col_heading intensified off.
write (120) text-006.
uline .
write : 'PR No ',
(15) 'Invoice No',
(30) 'Remark'.
uline.
format color col_negative intensified off.
write :/ i_invno-ebeln,
(15) p_invno ,
(30) 'Invoice Already Exists'.
endform. " display_err
*& Form f_check_calc_price
text
--> p1 text
<-- p2 text
form f_check_calc_price .
data : d_pric type p decimals 6 ,
g_pric type p decimals 6,
v_exch type p decimals 4 value '0.1049'.
select single ebeln
waers
bedat
from ekko into (v_ebeln , v_waers , v_podat)
where angnr eq p_invno.
loop at i_input.
concatenate i_input-posnr(4) '0' into v_posnr.
select single p~ebeln
p~ebelp
matnr
p~menge
netpr
into i_netpr
from eket as t inner join ekpo as p
on t~ebeln eq p~ebeln
and t~ebelp eq p~ebelp
where t~ebeln eq v_ebeln
and t~banfn eq i_input-ebeln
and t~bnfpo eq v_posnr.
if v_waers eq 'JPY'.
i_netpr-netpr = i_netpr-netpr * 100.
endif.
if not i_input-netpr eq i_netpr-netpr.
append i_netpr.
clear : i_input, i_netpr, v_posnr.
else.
clear : i_input, i_netpr, v_posnr.
endif.
endloop.
delete adjacent duplicates from i_netpr comparing ebeln ebelp matnr.
modify zinvdiff from table i_final.
if i_netpr[] is not initial.
select matnr
knumh
from a004
into table i_a004
for all entries in i_netpr
where matnr = i_netpr-matnr
and kschl = 'ZPR0'
and vkorg = 'SBAP'
and vtweg = 'DD'
and ( datab <= sy-datum and datbi => sy-datum ).
select matnr
knumh
from a004
into table i_a0041
for all entries in i_netpr
where matnr = i_netpr-matnr
and kschl = 'ZPR0'
and vkorg = 'EXPT'
and vtweg = 'BR'
and ( datab <= sy-datum and datbi => sy-datum ).
select matnr mvgr2 from mvke
into corresponding fields of table i_mvke
for all entries in i_netpr
where matnr = i_netpr-matnr
and vkorg = 'SBAP'
and vtweg = 'DD'.
if i_a004[] is not initial.
select knumh
kbetr
from konp
into table i_konp
for all entries in i_a004
where knumh = i_a004-knumh.
loop at i_a004.
read table i_konp with key knumh = i_a004-knumh.
i_konp-kbetr = i_konp-kbetr / 10.
move i_konp-kbetr to i_a004-kbetr.
modify i_a004.
clear : i_konp, i_a004.
endloop.
endif.
if i_a0041[] is not initial.
select knumh
kbetr
from konp
into table i_konp1
for all entries in i_a0041
where knumh = i_a0041-knumh.
loop at i_a0041.
read table i_konp1 with key knumh = i_a0041-knumh.
move i_konp1-kbetr to i_a0041-kbetr.
modify i_a0041.
clear : i_konp1, i_a0041.
endloop.
endif.
if i_mvke[] is not initial.
select pcode
fact
wfact
into table i_domsal
from zprice_grpsal
for all entries in i_mvke
where pcode = i_mvke-mvgr2
and vkorg = 'SBAP'
and vtweg = 'DD'
and lifnr = v_lifnr.
select pcode
fact
wfact
into table i_grpsal
from zprice_grpsal
for all entries in i_mvke
where pcode = i_mvke-mvgr2
and vkorg = 'EXPT'
and vtweg = 'BR'
and lifnr = v_lifnr.
endif.
loop at i_input .
read table i_mvke with key matnr = i_input-matnr.
if sy-subrc = 0.
move i_mvke-mvgr2 to i_input-mvgr2.
endif.
read table i_domsal with key pcode = i_input-mvgr2.
if sy-subrc = 0.
d_pric = i_domsal-fact / i_domsal-wfact.
i_input-dpric = i_input-netpr * d_pric * ( 112 / 100 ).
endif.
read table i_grpsal with key pcode = i_input-mvgr2.
if sy-subrc = 0.
g_pric = i_grpsal-fact * i_grpsal-wfact.
i_input-gpric = ( i_input-netpr * ( 112 / 100 ) ) / g_pric .
endif.
modify i_input.
clear i_input.
clear d_pric.
clear g_pric.
endloop.
endif.
endform. " f_check_price
*& Form f_display_data
text
--> p1 text
<-- p2 text
form f_display_data .
loop at i_netpr.
move i_netpr-ebeln to i_final-ebeln.
move i_netpr-ebelp to i_final-ebelp.
move i_netpr-matnr to i_final-matnr.
move i_netpr-netpr to i_final-poprc.
move i_netpr-menge to i_final-asqty.
move p_invno to i_final-invoice.
append i_final.
clear i_final.
endloop.
loop at i_final.
move v_podat to i_final-podat.
read table i_input with key matnr = i_final-matnr.
move i_input-netpr to i_final-invpr.
move i_input-dpric to i_final-dcalclp.Dear Santosh,
I haven't gone through your piece of code.
But I can suggest a way out, while handling multiple line-items.
The following code sample elucidate the use of multiple line-items. This is just an example for your understanding.
FORM BDC_OPERATION .
DATA: LV_ARBPL(15) TYPE C,
LV_ROWNO(2) TYPE N.
LOOP AT IT_TABDATA INTO WA_TABDATA.
CLEAR: LV_ARBPL
LV_ROWNO = SY-TABIX.
CONCATENATE 'PLPOD-ARBPL' '(' LV_ROWNO ')' INTO LV_ARBPL.
PERFORM BDC_DYNPRO USING 'SAPLCPDI' '1400'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' LV_ARBPL.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=PICK'.
PERFORM BDC_FIELD USING LV_ARBPL WA_TABDATA-ARBPL.
ENDLOOP.
ENDFORM. " BDC_OPERATION
Regards,
Abir
Please don't forget to award points * -
Hi All,
My require ment is to Calculate the Vendor Performance Based on Change in Delivery Date (Item Level), Open Qty(Item Level) and Statistics-relevant delivery date (Header Level).
For that the field Open Qty - OBMNG is relevant.
Pls do suggest me in which DB table should i search and retreive the data's for this feild.
Thanks & Regds.
Ramesh.Hi Max Bianchi,
Any idea how to get the field value of OBMNG(Open Qty), B'cas u told it is calculated at runtime, then is it possible for to retrevive it or store in any other DB.
Pls do suggest me.
Thanks and Regds.
Ramesh. -
New field in Enjoy PO (ME22N) on item level. not changable.
I searched the forum for this, but hmmm was kinda flooded with stuff not belonging to my subject. Maybe we should have Search courses...
So dudes this is the first time i have to adopt/enhance SAPLMEGUI.
I Appended include CI_EKPODB.
Since this is included in MEPOITEM i didnt had to append MEPOITEM.
My field is on the business-tab on item level. (Dynrpo 1322).
So i appended MEPO1322.
Then i modified Dynrpo 1322 (as it was already modified) and added my new field.
For testing issues i took a PO and used SE16N and &sap_edit to get some value into my new field for a certain PO-item.
When i then tried ME22N with my PO i saw my field on the right position and even populated with the value i had just set.
The thing is that even tho i´m in ME22N it is not changable.
Are there any documentations on how to modify/enhance/whatever PO items in enjoy scenario?
Having a look at MEPOITEM it has 2 big includes:
MEPOITEM_DATA "according to comments those should be changable
MEPOITEM_TECH "according to comments those should NOT be driectly changable
But since CI_EKPODB is included in MEPOITEM_DATA i get the idea that my field should be changable.
Sorry if i didnt search properly, i tried, maybe you can give me a hint how to imrpove my searchesHi
Probably the metafield is missing, this is set by fm MEMFS_BUILD_MAPPING_PO_VIEWS
Here the form mepo1320 is called:
FORM mepo1322 CHANGING ch_mapping TYPE mepo_t_metafield_mapping.
gf_tabname = 'MEPO1322'.
map 'AKTNR' mmmfd_promotion.
map 'ABELN' mmmfd_alloc_tbl.
map 'ABELP' mmmfd_alloc_tbl_item.
map 'SAISO' mmmfd_seas_cat.
map 'SAISJ' mmmfd_seas_year.
map 'AUREL' mmmfd_at_relev.
map 'KOLIF' mmmfd_prior_vend.
map 'BSGRU' mmmfd_reason_ord.
ENDFORM. " MEPO1322
Probably you should enhance it
Try to check class CL_MFS_MM, method REGISTER
Max -
Dear All,
I have a requirement where required delivery date for one divisions material
in sale order and STO should automatically propose todays date plus 10 days i.e.
if any sale order or STO created today then required delivery date in STO and
SO should show 24.10.2010.
Accordingly we have maintained planned delivery time in material master 10 days in MRP2
view and it is working fine but another requirement is that user can reschedule the
delivery and he can change the schedule line date in So (RV45A-ETDAT) before or after
10 days in VA02 but it is not allowing to change it is considering todays date + 10 days.
In STO it is allowing for change the delivery date (MEPO1320-EEIND).
Plz advice how I can make the field RV45A-ETDAT changeable in sale order through VA02.
Regards,
sps.Hello,
If you want a sales order to have the requested delivery date automatically populated with today's date +10 business days, this can be maintained via the following SPRO path:
SAP IMG --> Sales and Distribution --> Sales --> Sales Documents --> Sales Document Header --> Define Sales Document Types
Go into the sales document type you would like to maintain. In the section "Requested delivery date/pricing date/purchase order date", there is a field Lead Time in Days. Put 10 in here, and the requested delivery date will automatically be set to +10 days when an order is being created.
Planned delivery time in the material master is for when you're out of stock and the system proposes the next available delivery date. If you have stock on hand, when the availability check runs the system will use the line level delivery date. At order entry, when a line item created this line level delivery date is taken from the requested delivery date.
I hope this helps you. -
Hi,
In ME21N T-Code if i want to retrive the values of the fields.
Statistics-relevant delivery date - EEIND
Open Qty - OBMNG
Schedule Lines - ETENR
Schedule Qty - MENGE
Deliver Date - EEIND
G.R. Qty - WEMNG
which Databse table should i refer.I checked in the tables EKKO and EKPO but i cud not find these fileds.
Pls do suggest me.
Thanks & Regds.
Ramesh.Hi Ravikumar Allampallam,
My require ment is to Calculate the Vendor Performance Based on Change in Delivery Date (Item Level) and Statistics-relevant delivery date (Header Level).
For that the fields EEIND, OBMNG is relevant.
From ur help i found MENGE, WEMNG and ETENR fileds in EKET but i need this Change in Deliver Date Filed with that 1ly i can calculate the vendor performance.
Pls suggest me.
Thanks & Regds.
Ramesh. -
Dear gurus,
i have created one quick view for scheduling agreement where in all pending delivery schedules for a perticuler period will appear . but i am not getting the table for OBMNG ( open quantity ).
if this is the result of deduction from scheduled qty to GR qty. & is set in the programme.
then how to take it in the quick view
inamdarInamdar,
I don't believe this functionality is available in SQVI. For this, you would have to create a regular (not quickview) query in SQ01. Regular queries support the creation of local fields, which can be calculations. See online help at
http://help.sap.com/erp2005_ehp_04/helpdata/EN/d2/cb4186455611d189710000e8322d00/frameset.htm
Rgds,
DB49 -
Hi Experts,
I need to extract the data (STO Data) from ECC to BW.
CLIENT has given the below fields to extract into BW, actually client has given STRUCTURE name but in which tables can i find the below fields, so that i will create generic data source and extract the data into BW System.
Purchasing Document MEPO_TOPLINE EBELN
Order Type MEPO_TOPLINE BSART
Document Date MEPO_TOPLINE BEDAT
Material Number MEPO1211 EMATN
Material Text MEPO1211 TXZ01
Purchase Order Quantity MEPO1211 MENGE
Delivery Date MEPO1320 EEIND
Scheduled Quantity MEPO1320 MENGE
Committed Date MEPO1320 DAT01
Material Staging/Availability Date MEPO1320 MBDAT
Loading Date MEPO1320 LDDAT
Goods Issue Date MEPO1320 WADAT
Goods Receipt End Date MEPO1320 ELDAT
Committed Quantity MEPO1320 MNG02
Quantity Delivered (Stock Transfer) MEPO1320 GLMNG
Plant MEPO1211 NAME1
Company Code MEPO1222 BUKRS
Sales Organization MEPO1331 VKORG
Sold to MEPO1331 KUNNR
Ship to ADDR1_DATA NAME1
Incoterms MEPO1226 INCO1
Item MEPO1211 EBELP
Regards
VenuscmYou can make use of the data source 2LIS_02_SCL.
You'll find the fields in -
EKKO - PO Doc Header
EKPO - PO Line Item
EKET - Scheduling Agreement Schedule Lines
EKBE - History per Purchasing Document (You may not require this, but still)
2LIS_02_SCL should suffice your needs to at least 95% if not 100%.
I do not think you need a Generic Data source. -
Hi All,
I would like to know where i can find the program which is updating the field WEMNG in table EKET.
Eg: Purchase Order with one line & this line has 2 delivery schedules
PO qty = 10 nos, (EKPO-MENGE)
1st delivery schedule qty = 5 nos (EKET-MENGE)
2nd delivery schedule qty = 5 nos (EKET-MENGE)
The EKET table has 2 entries i.e
line 1: EKET-ETENR = 0001, EKET-MENGE = 5
line 2: EKET-ETENR = 0002, EKET-MENGE = 5
I understand when i do a goods receipt, EKET-WEMNG field is updated, but i want to know which program is actually doing this. Where can i find the code. I checked in MEPO1320 structure, but was unable to find the code, i checked in SAPLMEGUI, but was not successful either, maybe i havent checked in the right place.
Hope my question is clear, await inputs
Regards,
VivekHi Sagun,
The reason i want to know is because, i want to implement the same logic in a query which i am trying to build. I want to subtract the quantity coming from EKES table for line 1 until the quantity is 5 & after that i want it to subtract from line 2.
I hope you are clear of the problem i am facing. Awaiting your inputs to resolve this.
Vivek
Maybe you are looking for
-
The "Use Selection of Structure Elements" Option in RSRT Query Properties
Hi, does anyone know the side effect of enabling this option for all BEx Queries? The help states the following: "The Use Selection of Structure Elements option can be selected for any query; however, it is only useful in some cases. In queries, sele
-
Certificate chain: ValidateCertChain utility
When I run java -cp weblogic.jar utils.ValidateCertChain -jks mykey mykeystore to validate the Certificate Chain which is present in mykeystore , it return the following error (some information obfuscated): Cert[0]: CN=XXXXXX,OU=YYY,O=ZZZ,L=WWW,ST=ZZ
-
Appraisals in ESS : PP_MY_APP,PP_MY_APP_MGT
Hi, I wanted to know if the PP_MY_APP for employee is geared up to handle Appraisals in the Objective setting phase. It shows Appraisals only when the Status is completed. I cannot see appraisals which are in review Phase. I want that the Appraisal f
-
I can't update my Ipad 2 to ios 7 through WiFii. When i try to update with my PC and Itunes I get an error message, "an unknown error occurred (4016)" Anyone who knows what to do?
-
Bought my EOS 70D a couple months ago and it has been working great until recently. Now, my shutter lag is a few seconds long. I've checked the drive mode and it is in single shutter mode, not self-timer (however, I have used the self-timer recently)