01-04-2006 12:27 PM
Hi,
I am BDCing to
ME27
ME28
and its same "okay-while-debugging-but-runtime-causing-error" story.
the error is:
No batch input data for screen RM06EF00 1000
i hav tried
wait up to 5 seconds.
but i guess that is more counter-productive.
this is what i hav written: the sap version is <i>4.6 B</i>
FORM form_bdc_me28 USING
p_wa_init TYPE ty_struct_init
CHANGING
value(return_code).
DATA bdc_low_001(010).
DATA: wa_messtab LIKE LINE OF messtab,
w_textout LIKE t100-text.
bdc_low_001 = p_wa_init-ebeln.
PERFORM bdc_dynpro USING 'RM06EF00' '1000'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S_EBELN-LOW'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ONLI'.
PERFORM bdc_field USING 'S_EBELN-LOW'
bdc_low_001.
PERFORM bdc_dynpro USING 'SAPMSSY0' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'05/09'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=FRGU'.
PERFORM bdc_transaction USING 'ME28' CHANGING
return_code.
PERFORM form_bdc_show_s_msg.
ENDFORM.
01-04-2006 1:06 PM
Hi
I think it should be better to use this BAPI_PO_RELEASE instead of BDC for ME28 and BAPI_PO_CREATE for ME27 if they are in your release.
Max
01-04-2006 12:40 PM
Hi,
In the BDC for ME28, you are giving only the document number as input. Are there any other fields that are requried? like say the release code ? In my system here, the release code is mandatory.
<b>PERFORM bdc_dynpro USING 'RM06EF00' '1000'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S_EBELN-LOW'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ONLI'.
PERFORM bdc_field USING 'S_EBELN-LOW'
bdc_low_001.</b>
These lines shows the data for screen 1000, and only s_ebeln_low is provided.
Can you run ME28 transaction directly and check what are the required fields ?
Thanks,
Renjith.
01-04-2006 12:46 PM
Hi Flora,
Renjith was Correct.
I see the field Release Code as Mandatory in me28 screen.
Pass that value also.Screen field is 'P_FRGCO'.
REgards,
Ravi
01-04-2006 12:54 PM
Hi flora,
report ZTEST1234
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:
P_FRGCO_001(002),
* data element:
P_FRGSE_002(001),
* data element:
P_FRGVO_003(001),
* data element:
LISTU_004(010),
* data element:
LOW_005(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 'RM06EF00' '1000'.
perform bdc_field using 'BDC_CURSOR'
'P_FRGCO'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'P_FRGCO'
record-P_FRGCO_001.
perform bdc_field using 'P_FRGSE'
record-P_FRGSE_002.
perform bdc_field using 'P_FRGVO'
record-P_FRGVO_003.
perform bdc_field using 'LISTU'
record-LISTU_004.
perform bdc_field using 'S_BSTYP-LOW'
record-LOW_005.
perform bdc_transaction using 'ME28'.
enddo.
perform close_group.
perform close_dataset using dataset.
i recorded me28 that is running fine.
just compare ...
do recording once again and try...
you can get the code from shdb itself
after recording , save the recording and then say back
and click the program button it will ask you the program name and then specify the program name, it will provide the code for you check the code with previous one.
thanks
vijay
01-04-2006 1:06 PM
Hi
I think it should be better to use this BAPI_PO_RELEASE instead of BDC for ME28 and BAPI_PO_CREATE for ME27 if they are in your release.
Max