‎2007 Mar 21 4:45 PM
Hi
I am unable to proceed to record (shdb) for the transaction MB1C from the second screen onwards. I have pasted the code generated from my recording below.
The error i get is :
1. I get a pop up screen ( like POPUP_TO_CONFIRM ) with the title " CODING BLOCK".
2. On continuing i get: " Qty. Convers. Carried out for atleast one alternate UoM at Mat. Plan.Val. ( Message 029 of Class XU ).
Any help is appreciated and will be rewarded with points.
Regards,
Aruna.
The code follows:
report ZMB1C_TEST
no standard page heading line-size 255.
include bdcrecx1.
parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
*
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
*
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: BLDAT
BLDAT_001(010),
data element: BUDAT
BUDAT_002(010),
data element: BWARTWA
BWARTWA_003(003),
data element: WERKS_D
WERKS_004(004),
data element: LGORT_D
LGORT_005(004),
data element:
XFULL_006(001),
data element: WVERS2
WVERS2_007(001),
data element: MATNR
MATNR_01_008(018),
data element: ERFMG
ERFMG_01_009(017),
data element: CHARG_D
CHARG_01_010(010),
data element: FMORE
FMORE_011(001),
end of record.
End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMM07M' '0400'.
perform bdc_field using 'BDC_CURSOR'
'RM07M-LGORT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MKPF-BLDAT'
record-BLDAT_001.
perform bdc_field using 'MKPF-BUDAT'
record-BUDAT_002.
perform bdc_field using 'RM07M-BWARTWA'
record-BWARTWA_003.
perform bdc_field using 'RM07M-WERKS'
record-WERKS_004.
perform bdc_field using 'RM07M-LGORT'
record-LGORT_005.
perform bdc_field using 'XFULL'
record-XFULL_006.
perform bdc_field using 'RM07M-WVERS2'
record-WVERS2_007.
perform bdc_dynpro using 'SAPMM07M' '0421'.
perform bdc_field using 'BDC_CURSOR'
'MSEG-CHARG(01)'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MSEG-MATNR(01)'
record-MATNR_01_008.
perform bdc_field using 'MSEG-ERFMG(01)'
record-ERFMG_01_009.
perform bdc_field using 'MSEG-CHARG(01)'
record-CHARG_01_010.
perform bdc_field using 'DKACB-FMORE'
record-FMORE_011.
perform bdc_transaction using 'MB1C'.
enddo.
perform close_group.
perform close_dataset using dataset.
‎2007 Mar 21 5:01 PM
Can't you try to make the recording without avoiding SAP alerts or notifications ?
RIU
arthur
‎2007 Mar 21 5:01 PM
Can't you try to make the recording without avoiding SAP alerts or notifications ?
RIU
arthur
‎2007 Mar 22 8:25 AM
Thanks arthur for the update.
It will help greatly if you could give pointers on how to proceed with the recording without avoiding SAP alerts or notifications.
Thank you.
‎2007 Mar 22 9:56 AM
if there are for instance mandatory fields you can press enter on every field and get a error that some fields need to be filled in or you can fill in everything already and avoid messages about mandatory fields.
with LSMW recordings especially which is merely the same priniciple based on BDC , error messages are really killing and have to be avoided at any cost. You just have to try you're self in you're transaction where you run into and how to avoid it in you're recording.
when I run the transaction I don't get the error. I guess you have t check the material master or try an other material to see if the error persists. for so far I can tell the error suggests that there is a difference between the units of order and goodsmovement.
This can happen for instance if the material has as a unit BOX since the unit you order it in is in BOXes. but when someone in you're company needs that part he only wants 1 piece and not a whole box (where a box for example contains 12 pieces). so the goodsmovement unit is different from the ordering unit.
try the recording with a material where there is no difference between those 2 units.
Message was edited by:
A. de Smidt
‎2007 Mar 22 8:34 AM
Instead of BDC u can try BAPI.
BAPI TO Upload Inventory Data
*
GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
*
Domain: KZBEW - Movement Indicator
Goods movement w/o reference
B - Goods movement for purchase order
F - Goods movement for production order
L - Goods movement for delivery note
K - Goods movement for kanban requirement (WM - internal only)
O - Subsequent adjustment of "material-provided" consumption
W - Subsequent adjustment of proportion/product unit material
BAPI_GOODSMVT_CREATE
‎2007 Mar 23 6:46 AM
hi all,
I have solved the issue, and i am able to record and also execute the transaaction.
using the below work around.
data: v_options like ctu_params.
v_option-dismode = p_dsmode.
v_option-updmode = p_udmode.
v_option-cattmode = ' '.
v_option-defsize = 'X'.
v_option-racommit = ' '.
v_option-nobinpt = 'X'.
v_option-nobiend = ' '.
CALL TRANSACTION 'MB1C'
USING i_bdcdata
MESSAGES INTO i_msgtab
OPTIONS FROM v_option.
Thanks to everyone for the interest and time. i have tried to be as generous as possible with the points.
regards,
aruna.