ME11 BATCH INPUT
hi. I'm having problem with my batch input. here is my code:
PERFORM BDC_DYNPRO TABLES BDCDATA USING 'SAPMM06I' '0100'.
PERFORM BDC_FIELD TABLES BDCDATA USING:
'BDC_OKCODE' '=ENTR',
'EINA-LIFNR' I_REC-VENDOR,
'EINA-MATNR' I_REC-MATNR,
'EINE-EKORG' 'BE01',
'EINE-WERKS' P_WERKS.
PERFORM BDC_DYNPRO TABLES BDCDATA USING 'SAPMM06I' '0102'.
PERFORM BDC_FIELD TABLES BDCDATA USING:
'BDC_OKCODE' '=ENTR',
'EINE-APLFZ' I_REC-PLADEL,
'EINE-NETPR' I_REC-NETPR.
PERFORM BDC_DYNPRO TABLES BDCDATA USING 'SAPLSPO1' '0100'.
PERFORM BDC_FIELD TABLES BDCDATA USING:
'BDC_OKCODE' '=YES'.
CALL TRANSACTION 'ME11' USING BDCDATA
MODE 'E'
UPDATE 'S'
MESSAGES INTO ITAB_MSG.
but when i run my program the screen shows up and needs to press enter to continue.
I need to create info record thru batch input but the 2nd screen shows up everytime i run the program. Please let me know what i did wrong.
thanx.
There may be probelm in recarding.....
u can also test that recording in SHBD...(check it weather it is properly recorded or not)...
Ramesh.
Similar Messages
-
Error during batch Input TCode ME11
Hi,
I'm working on a bath input for tcode ME11 to post the Record Info.
A warning message You have not entered a planned delivery time causes an error to the Batch Input. I cant ignore. How I can ignore this message?
If I call the transaction manually I can ignore the massge via "Enter".
Thanks.Hi Salvatore,
I'm in the same situation. I execute a BI, but it stops after a waring appears.
If I proceed the transaction manually, the warning appears, but if I press ENTER the transaction ends successful.
Did you solved your Problem or did you have an hint for me.
Kind regards
Yvonne Adler -
BDC Batch input session method
Hi ,
I am new to SAP progamming. Pls let me know the basics of BDC Batch Input session method and Call transaction method. I want to know the pros and cons of both methods with justification. Please help me in this regarding.Hi,
Session method.
1) synchronous processing.
2) can tranfer large amount of data.
3) processing is slower.
4) error log is created
5) data is not updated until session is processed.
Call transaction.
1) asynchronous processing
2) can transfer small amount of data
3) processing is faster.
4) errors need to be handled explicitly
5) data is updated automatically
Check these link:
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm
http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
http://www.planetsap.com/bdc_main_page.htm
Session method:
1. Data migration is done in two steps .. Generate session and Process session.
So resouces can be used efficiently. good for bulkdata migration.
2. Session method generates error log when u process a session.
3. No SY-SUBRC can be returned after each transaction is called.
4. Provides synchronous Updation only...
Call transaction method:
1. Data migration is done in single steps ..bcoz Transactions are called immediately after filling BDCDATA table. So good for small amount of data.
2. We have to collect error messages using BDCMSGCOLL Table
3. Returns SY-SUBRC and Messages ..after each Call Transaction..very useful feature for further processing based on the Status and Messages..
4. Supports Asynch or Synch Updation.
Example code for session method
Here is the porgram for Purchase order
REPORT zmm0069 NO STANDARD PAGE HEADING
MESSAGE-ID z0
LINE-SIZE 132
LINE-COUNT 65(2).
Internal Tables *
*Internal table for the purchasing info records fields.
DATA: BEGIN OF i_inforecord OCCURS 0,
matnr(18),
lifnr(10),
uom(3),
ekgrp(3),
planned_time(3),
under_tol(3),
over_tol(3),
qty(10),
price_cat(5),
inco(3),
designation(28),
netpr(13),
scale_qty1(10),
scale_pr1(13),
scale_qty2(10),
scale_pr2(13),
scale_qty3(13),
scale_pr3(10),
scale_qty4(13),
scale_pr4(10),
scale_qty5(13),
scale_pr5(10),
scale_qty6(13),
scale_pr6(10),
scale_qty7(13),
scale_pr7(10),
scale_qty8(13),
scale_pr8(10),
scale_qty9(13),
scale_pr9(10),
scale_qty10(13),
scale_pr10(10),
END OF i_inforecord.
Internal table for Old and New Vendor number
DATA : BEGIN OF i_lfb1 OCCURS 1,
lifnr(10),
altkn(10),
END OF i_lfb1.
Declare internal table for Call Transaction and BDC Session
DATA: i_bdc_table LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Global Variables *
DATA: g_counter(2) TYPE n,
g_field_name(18) TYPE c,
zc_yes TYPE syftype VALUE 'X'.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
PARAMETERS: p_fname1 TYPE localfile .
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
PARAMETERS: p_rloc1 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-003.
PARAMETERS p_group(12) OBLIGATORY DEFAULT 'ZPURCHINFO'.
SELECTION-SCREEN END OF BLOCK c.
SELECTION-SCREEN END OF BLOCK b.
SELECTION-SCREEN END OF BLOCK a.
**WRITE the report header
TOP-OF-PAGE.
INCLUDE zheading.
Start of selection *
START-OF-SELECTION.
Load Input file
PERFORM f_load_input_file.
Create BDC records.
PERFORM create_bdc_records .
*& Form Create_BDC_records
Perform the BDC for the records in the internal table
FORM create_bdc_records .
IF NOT i_inforecord[] IS INITIAL.
Open BDC session
PERFORM open_bdc_session.
SELECT lifnr altkn FROM lfb1 INTO TABLE i_lfb1
FOR ALL ENTRIES IN i_inforecord
WHERE altkn = i_inforecord-lifnr.
Sorting the Internal table for better performance
SORT i_lfb1 BY altkn.
LOOP AT i_inforecord.
***Mapping Old Vendor number to the new Vendor number
READ TABLE i_lfb1 WITH KEY altkn = i_inforecord-lifnr BINARY
SEARCH.
IF sy-subrc EQ 0.
i_inforecord-lifnr = i_lfb1-lifnr.
ENDIF.
CLEAR i_bdc_table[].
PERFORM insert_screen_header.
call transaction 'ME11' using i_bdc_table
mode 'A'.
CLEAR i_bdc_table.
ENDLOOP.
CLEAR i_inforecord[].
PERFORM close_bdc_session.
Release the BDC sessions created
PERFORM release_bdc.
ENDIF.
ENDFORM. " open_group
*& Form bdc_dynpro_start
Start the screen for the transfer of fields
FORM bdc_dynpro_start USING p_g_program_1
p_g_screen.
CLEAR i_bdc_table.
i_bdc_table-program = p_g_program_1.
i_bdc_table-dynpro = p_g_screen.
i_bdc_table-dynbegin = 'X'.
APPEND i_bdc_table.
ENDFORM. " bdc_dynpro_start_start
*& Form bdc_insert_field
Insert field *
FORM bdc_insert_field USING f_name f_value.
IF f_value <> space.
CLEAR i_bdc_table.
i_bdc_table-fnam = f_name.
i_bdc_table-fval = f_value.
APPEND i_bdc_table.
ENDIF.
ENDFORM. "bdc_insert_field
*& Form open_bdc_session
Open a BDC session
FORM open_bdc_session .
Open BDC session and create and update records
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
DEST = FILLER8
group = p_group
HOLDDATE = FILLER8
keep = 'X'
user = sy-uname
RECORD = FILLER1
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " create_bdc_session
*& Form insert_screen_header
Screen flow for the transfer of fields
FORM insert_screen_header .
First Screen 100
PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
PERFORM bdc_insert_field USING:'BDC_CURSOR' 'EINA-LIFNR',
'BDC_OKCODE' '/00',
'EINA-LIFNR' i_inforecord-lifnr,
'EINA-MATNR' i_inforecord-matnr,
'EINE-EKORG' '1000',
'RM06I-NORMB' zc_yes.
Next Screen 101
PERFORM bdc_dynpro_start USING 'SAPMM06I' '0101'.
PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'EINA-MAHN1',
'BDC_OKCODE' '/00',
'EINA-MEINS' i_inforecord-uom.
*Next Screen 102
PERFORM bdc_dynpro_start USING 'SAPMM06I' '0102'.
PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'EINE-INCO2',
'EINE-APLFZ' i_inforecord-planned_time,
'EINE-EKGRP' i_inforecord-ekgrp,
'EINE-NORBM' i_inforecord-qty.
PERFORM bdc_insert USING 'EINE-UEBTK' ' '.
PERFORM bdc_insert_field USING:'EINE-PEINH' i_inforecord-scale_qty1,
'EINE-BPRME' i_inforecord-uom,
'EINE-UNTTO' '5',
'EINE-UEBTO' '25',
'EINE-MEPRF' i_inforecord-price_cat,
'EINE-NETPR' i_inforecord-netpr,
'EINE-INCO1' i_inforecord-inco,
'EINE-INCO2' i_inforecord-designation.
Checking for Scale quantities
IF i_inforecord-scale_qty2 = space.
PERFORM bdc_insert_field USING 'BDC_OKCODE' '=BU'.
PERFORM insert_bdc_new.
ELSE.
PERFORM bdc_insert_field USING 'BDC_OKCODE' '=KO'.
Next Screen 201
PERFORM bdc_dynpro_start USING 'SAPMV13A' '0201'.
PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'RV13A-DATAB',
'BDC_OKCODE' '=PSTF'.
Next Screen 201
PERFORM bdc_dynpro_start USING 'SAPMV13A' '0201'.
PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'KONP-KSCHL(01)',
'BDC_OKCODE' '=PSTF',
'RV130-SELKZ(01)' zc_yes.
LAST SCREEN 303
PERFORM bdc_dynpro_start USING 'SAPMV13A' '0303'.
PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'KONM-KBETR(03)',
'BDC_OKCODE' '=SICH'.
Counter to Loop the Item level entry
g_counter = 0.
PERFORM scale_entry USING i_inforecord-scale_qty2
i_inforecord-scale_pr2.
PERFORM scale_entry USING i_inforecord-scale_qty3
i_inforecord-scale_pr3.
PERFORM scale_entry USING i_inforecord-scale_qty4
i_inforecord-scale_pr4.
PERFORM scale_entry USING i_inforecord-scale_qty5
i_inforecord-scale_pr5.
PERFORM scale_entry USING i_inforecord-scale_qty6
i_inforecord-scale_pr6.
PERFORM scale_entry USING i_inforecord-scale_qty7
i_inforecord-scale_pr7.
PERFORM scale_entry USING i_inforecord-scale_qty8
i_inforecord-scale_pr8.
PERFORM scale_entry USING i_inforecord-scale_qty9
i_inforecord-scale_pr9.
PERFORM scale_entry USING i_inforecord-scale_qty10
i_inforecord-scale_pr10.
PERFORM insert_bdc_new.
ENDIF.
ENDFORM. " insert_screen_header
*& Form insert_bdc
Insert BDC
FORM insert_bdc_new .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'ME11'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
dynprotab = i_bdc_table
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR i_bdc_table[].
ENDFORM. " insert_bdc
*& Form close_bdc_session
Close the BDC session
FORM close_bdc_session .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " close_bdc_session
*& Form f_load_input_file
Upload the file
FORM f_load_input_file.
Check always Local file for upload
IF p_rloc1 = zc_yes.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_fname1
filetype = 'DAT'
TABLES
data_tab = i_inforecord
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
STOP.
ENDIF.
ENDIF.
ENDFORM. " f_load_input_file
*& Form release_bdc
Release the session
FORM release_bdc.
SUBMIT rsbdcsub WITH mappe EQ p_group
WITH von EQ sy-datum
WITH bis EQ sy-datum
WITH fehler EQ '.'
EXPORTING LIST TO MEMORY
AND RETURN.
ENDFORM. " release_bdc
*& Form scale_entry
Populate the Scale quantities
-->P_SCALE_QTY
-->P_SCALE_PRICE
FORM scale_entry USING p_scale_qty
p_scale_price.
Increment the Counter
g_counter = g_counter + 1.
IF p_scale_qty <> space.
CONCATENATE 'KONM-KSTBM(' g_counter ')' INTO g_field_name.
PERFORM bdc_insert_field USING g_field_name p_scale_qty.
CONCATENATE 'KONM-KBETR(' g_counter ')' INTO g_field_name.
PERFORM bdc_insert_field USING g_field_name p_scale_price.
ENDIF.
ENDFORM.
*& Form bdc_insert
To uncheck the Unlimited (UEBTK)
FORM bdc_insert USING f_name f_value.
CLEAR i_bdc_table.
i_bdc_table-fnam = f_name.
i_bdc_table-fval = f_value.
APPEND i_bdc_table.
ENDFORM. " bdc_insert
Reward points if it is usefull ....
Cheers,
Chandra Sekhar. -
Batch input of a list of values
Hello,
I have to make a batch input of a list.
The screen of the transaction contains a list with 9 lines, if i enter a value in one, another line is added to the list.
I did record this transaction and have an incremented list in the generated program that looks like this :
it begins whith ADRPCIT-POST_CODE(01) and increments till 09
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(08)'
record-POST_CODE_08_017.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(09)'
record-POST_CODE_09_018.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(07)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(07)'
record-POST_CODE_07_019.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(08)'
record-POST_CODE_08_020.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(09)'
record-POST_CODE_09_021.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
What i did is setting the value of the incremented number to 09 if it's greater than 09 but i'm not sure it's the right way to do it cause i get only 9 records
My code :
LOOP AT gt_record ASSIGNING <fs_record>.
IF sy-tabix > 9.
ligne = 9.
ELSE.
ligne = sy-tabix.
ENDIF.
IF ligne > 1.
IF city_mem EQ <fs_record>-city_code_001.
flag_end = 'X'.
ELSE.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_transaction USING 'SR10'.
CLEAR flag_end.
ENDIF.
ENDIF.
city_mem = <fs_record>-city_code_001.
IF flag_end NE 'X'. "premier passage
PERFORM bdc_dynpro USING 'SAPLSZRC' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ADRCITYD-CITY_CODE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'ADRCITYD-CITY_CODE'
<fs_record>-city_code_001.
PERFORM bdc_field USING 'ADRCITYD-COUNTRY'
'FR'.
PERFORM bdc_field USING 'ADRCITYD-LANGU'
'F'.
PERFORM bdc_dynpro USING 'SAPLSZRC' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ADRCITYD-COMMU_CODE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'ADRCITYD-FLAG_STRTS'
'X'.
PERFORM bdc_field USING 'ADRCITYD-CITY_NAME'
<fs_record>-city_name_005.
PERFORM bdc_field USING 'ADRCITYD-REGION'
<fs_record>-region_006.
PERFORM bdc_field USING 'ADRCITYD-TIME_ZONE'
'CET'.
PERFORM bdc_field USING 'ADRCITYD-COMMU_CODE'
<fs_record>-commu_code_008.
PERFORM bdc_field USING 'ADRCITYD-DEF_LANGU'
'F'.
PERFORM bdc_dynpro USING 'SAPLSZRC' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ADRCITYD-CITY_NAME'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=PSTC'.
PERFORM bdc_field USING 'ADRCITYD-FLAG_STRTS'
'X'.
PERFORM bdc_field USING 'ADRCITYD-CITY_NAME'
<fs_record>-city_name_005.
PERFORM bdc_field USING 'ADRCITYD-REGION'
<fs_record>-region_006.
PERFORM bdc_field USING 'ADRCITYD-TIME_ZONE'
'CET'.
PERFORM bdc_field USING 'ADRCITYD-COMMU_CODE'
<fs_record>-commu_code_008.
PERFORM bdc_field USING 'ADRCITYD-DEF_LANGU'
'F'.
* PERFORM bdc_dynpro USING 'SAPLSZRL' '0400'.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLSZRL' '0400'. "ajout2
lignec = ligne.
CONCATENATE 'ADRPCDCITY-POST_CODE(' lignec ')' INTO cp.
PERFORM bdc_field USING 'BDC_CURSOR'
cp.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING cp
<fs_record>-post_code_01_016.
ENDLOOP.
* deniere sauvegarde
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_transaction USING 'SR10'.
CLEAR flag_end.
PERFORM close_group.
PERFORM close_dataset USING dataset.
Can somebody help me on this one ?
Thank you,
Tom.If it is table control you may have to pass PageDown after 9 rec & again start with (01)
record number remains 1 to 9 but Top_line parameter will change to 9or10 after 1 pagedown.
Cxould be P++
you can record Pagedown & check recording. -
Manual bank statement: no batch input was generated
Hi,
maybe somebody has a clue with this problem regarding FF67: after the data processing, no batch input is generated in order to post the bank statement.
Please, I need your help with an OSS note or with a posting solution without batch input ( I tried to process the bank statement with "processing type = 4", but it didn't work).Hi Andrea,
Try to add value in <i>Session name for bank postings</i>
Do not hesitate to ask for further clarifications. Award points if useful.
Regards,
Siva -
Batch input session is not generating In BRS
Hello,
I am uploading bank statement through ZFF67 program manual bank statement, after entering all the line items in the file, batch input session is not generating in SM35.
Please give advice.
Thanks,
RatnamHi,
Go to environment - specification- here you need to maintain settings for batch input processing in T.code FF67.
I am not exactly remembering the menu option name. The sub option name is Specification, these settings you need to change with your user id.
Check and revert back still the same problem exists.
Regards,
Sankar -
Is it possible to maintain a view vai Batch Input
Hi guys,
The user required to develop a BDC program to upload the data source from outside of SAP, and maintain these data into a view via Tcode: SM34. But it seems the view doesn't support Batch input.....
Can anybody tell me, is it possible to maintain a view via Batch input? Many thanks!
Brian LiuAdditional information:
This requirement is to upload the Overhead Rate data from outside of SAP, and maintained via KZM2 or SM34. But when I tried to record a BDC for KZM2, it seems that the SAP can not support batch input.
I find a SAP note 208474, it says:
Symptom
Overhead rates of the costing sheet of the overhead rates, which have been created, changed or deleted via batch input or Call Transaction, are not saved.
The same rates are saved if processing is carried out via Transaction KZZ2 or the Implementation Guide IMG.
Cause and prerequisites
Processing the Customizing transactions for maintaining the overhead rates of the costing sheet (Transaction KZZ2, KZM2) is
not supported in the batch input. This corresponds to the SAP standards according to which Customizing transactions in general need not necessarily be capable of batch input.
The batch input data of the overhead rates are not saved in the standard because processing is terminated by a COMMIT WORK. This statement ensures that the internal tables for the transport of the overhead rates are only deleted if their transfer to the database tables to be transported has been processed successfully.
Solution
The subsequent modification allows batch input processing of the overhead rates, by suppressing the COMMIT WORK statement. As a result of the modification, the tables in the transport request of the overhead rates may be incomplete in single cases.
In cases where the overhead rates have not been transferred completely to the target system after implementation of the modification, include the overhead rates again in a transport request, repeat the transport and, if necessary, subsequent processing.
Note that the attached modifications are not and will not be included in the R/3 standard system.
I modified the sap standard program L0COEF04 according to another SAP note 150041, but after the modification, I still couldn't record the BDC.
Anybody who have ever met the same situation, or can give me some suggestion? With many thanks!
Brian Liu -
How to check whether a batch input session is completed in ABAP program
I have created a ABAP program to create a batch input session (reference to RSBDCSUB). After the creation of the batch input session, I kick it to start and read the execution log. However, sometimes I cannot read anything from the execution log as the execution of the batch input is a synchronized process to the execution of my program, i.e. at the time being that I try to read the log of a particular transaction, that transaction is being processing / haven't start processing.
How can I check whether a batch input session is completed in the program?
The code that corresponding to the triggering of batch input session:
SUBMIT (SUBREPORT)
USER MTAB-USERID
VIA JOB MTAB-GROUPID
NUMBER JNUMB
WITH QUEUE_ID EQ MTAB-QID
WITH MAPPE EQ MTAB-GROUPID
WITH MODUS EQ 'N'
WITH LOGALL EQ LMODUS
Or is there any method to wait here until the process is completed before further processing?Hi gundam,
1. Or is there any method to wait here until the process is completed before further processing?
There is no such direct method to wait.
2. Immediately after submitting in background,
we cannot wait
neither can we LOOP and go on detecting
whether the b/g process has completed or not !
3. To over come such problems,
we have to use another technique.
4. we have to submit another
job which will get triggered
on event SAP_END_OF_JOB
ie. when the original job will finish,
our new job will AUTOMATICALLY get triggered,
5. This new job / program
will do the FURTHER actions !
regards,
amit m. -
Batch input for IQ02 not accepting "yes" for 'POPUP_TO_CONFIRM'
Hello,
I wrote a batch input for a transaction (IQ02) and all works fine except one thing:
-when all data is entered and SAVE button is pressed, there is an additional pop-up, from an user exit which needs an YES/NO answer.
The function module used to display the popup is: 'POPUP_TO_CONFIRM'
I do not manage to press the YES button. This is the data I receive when pressing F1 on YES button:
Program SAPLSPO1
Function OPT1
Normally, in batch input, this is the way I pass user-commands:
PERFORM bdc_dynpro USING 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
But it's not working for this particular situation.
Any ideas?
Thank you.
Edited by: Julius Bussche on Jan 5, 2009 2:07 PM
Quality of subject title improved.Hi
Find out under which condition popups appears.
for that condition you have to put the following code
PERFORM bdc_dynpro USING 'SAPLSPO1' ''<SCREEN_NUMBER>'.
PERFORM bdc_field USING 'BDC_OKCODE' '=OPT1' .
Hope this helps,
Rajat -
Error while creating a product group--Batch input error 9
Hi,
While creating a product group in T-code MC84, getting the error message" Product group can not be created (Batch input error 9)". Would appreciate providing yr help to resolve above issue.
Thks,
NileshHi Neel,
As ponited by you, the material type "PROD" is realted with creation of product group.I am able to resolve the error, "actually the work schedulling & MRP views were not activated for "PROD" resulting in the above error.
Thks for yr help.
Regards,
Nilesh -
BDC programming using Batch input Session.
Hello Experts.
I'm an ABAP beginner. I've benn practicing BDC programming using Batch input Session
at the moment.
This is the program that upload Local file which has plural records, and put the records into a Session.
These are the records.
413459,KIM EI HWAN121 ,19810607,MIADONG1234
423459,KIM EI HWAN122 ,19810607,MIADONG1235
433459,KIM EI HWAN123 ,19810607,MIADONG1236
443459,KIM EI HWAN124 ,19810607,MIADONG1237
453459,KIM EI HWAN125 ,19810607,MIADONG1238
463459,KIM EI HWAN126 ,19810607,MIADONG1239
I succeeded making Session.
However, for some reaseon, every record in the Session has got the same, value which is the first record.
Why is this happening? And How can I correct the code below?
REPORT ZBCUSER002_BATCH NO STANDARD PAGE HEADING
LINE-SIZE 255
MESSAGE-ID ZBATCH.
= Types definition ===================================================
TYPES: BEGIN OF TYP_LOCAL, "For Local file upload
RECORD(200) TYPE C,
END OF TYP_LOCAL.
= Internal table definition ==============================================
DATA: BEGIN OF BDC_TAB OCCURS 0. "BDCDATA itab
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDC_TAB.
DATA: BEGIN OF MESSAGE_BDC OCCURS 0. "Message itab
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF MESSAGE_BDC.
DATA: TBL_LOCAL TYPE STANDARD TABLE OF TYP_LOCAL, "Local file itab
F_TBL TYPE FILETABLE. "FILETABLE fot local
= Structure table definition =========================================
DATA: STR_F_TBL LIKE LINE OF F_TBL, "FILETABLE structure
STR_LOCAL TYPE TYP_LOCAL. "Local file structure
= Variable definition ================================================
DATA: LV_RC TYPE I, "Method parameter
ENUMBER TYPE ZT601-ENUMBER, "Employee number
NAME TYPE ZT601-NAME, "Employee name
BIRTH TYPE ZT601-BIRTH, "Birthday
HOMETOWN TYPE ZT601-HOMETOWN, "Hometown
SYSVAL TYPE SY-SUBRC. "System valuible
= Constants definition ===============================================
CONSTANTS: TBL_NAME(10) TYPE C VALUE 'ZT601'. "Table name ZT601
= Parameters definition ==============================================
PARAMETERS: F_NAME TYPE RLGRAP-FILENAME OBLIGATORY, "File path
EXECMODE(1) TYPE C. "Execute mode
INITIALIZATION
*----- Initialize all valuables, structures and internal tables
CLEAR: LV_RC,
STR_F_TBL,
STR_LOCAL,
ENUMBER,
NAME,
BIRTH,
HOMETOWN.
REFRESH: F_TBL,
TBL_LOCAL.
AT SELECTION-SCREEN
*----- When the button next to Parameter 'F_NAME',
*----- File dialog open.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR F_NAME.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'SELECT FILE'
DEFAULT_FILENAME = '*.TXT'
CHANGING
FILE_TABLE = F_TBL
RC = LV_RC
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
OTHERS = 3
*----- system valiable check.
*----- If done properly,
*----- Put the path into the File path parameter
IF SY-SUBRC = 0.
READ TABLE F_TBL INTO STR_F_TBL INDEX 1.
F_NAME = STR_F_TBL.
*----- If not done properly, show message
*----- An error occured while getting file path then end program
ELSE.
MESSAGE E000.
ENDIF.
*----- Execute code can only be A or N.
AT SELECTION-SCREEN ON EXECMODE.
IF EXECMODE <> 'A' AND EXECMODE <> 'N'.
MESSAGE E001.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
*----- Upload Local file of file path parameter.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = F_NAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = TBL_LOCAL
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6.
*----- System valiable check.
*----- If not done properly, show an error message
*----- An error occured while uploading local file then end program
IF SY-SUBRC <> 0.
MESSAGE E002.
ENDIF.
PERFORM BDC_OPEN.
*----- Loop Internal table
LOOP AT TBL_LOCAL INTO STR_LOCAL.
*----- Spilt the file record and put them into each valiable.
SPLIT STR_LOCAL AT ',' INTO ENUMBER
NAME
BIRTH
HOMETOWN.
*----- Data check Function module
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = BIRTH
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
OTHERS = 2.
*----- When error occurs while checking date, show an error message.
*----- (&1) is not date
IF SY-SUBRC <> 0.
MESSAGE E003 WITH BIRTH.
ENDIF.
*-- The first screen of SE11
*----- Screen number 0102 of program id SAPMSRD0
PERFORM BDC_DYNPRO USING 'SAPMSRD0' '0102'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RSRD1-TBMA_VAL'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SHOW'. "Display button
PERFORM BDC_FIELD USING 'RSRD1-TBMA'
'X'.
PERFORM BDC_FIELD USING 'RSRD1-TBMA_VAL'
TBL_NAME. "ZT601
*-- Table definition screen
*----- Screen number 2000 of program id SAPLSD02
PERFORM BDC_DYNPRO USING 'SAPLSD02' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'DD02D-TABCLTEXT'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=TDED'. "Create entry
PERFORM BDC_FIELD USING 'BDC_SUBSCR'
'SAPLSD02'.
PERFORM BDC_FIELD USING 'BDC_SUBSCR'
'SAPLSED5'.
*-- Data input screen
*----- Screen number 0101 of program /1BCDWB/DBZT601
PERFORM BDC_DYNPRO USING '/1BCDWB/DBZT601' '0101'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZT601-CRUSER'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SAVE'. "Save
PERFORM BDC_FIELD USING 'ZT601-MANDT'
SY-MANDT. "Client
PERFORM BDC_FIELD USING 'ZT601-ENUMBER'
ENUMBER. "Employee number
PERFORM BDC_FIELD USING 'ZT601-NAME'
NAME. "Employee name
PERFORM BDC_FIELD USING 'ZT601-BIRTH'
BIRTH. "Birthday
PERFORM BDC_FIELD USING 'ZT601-HOMETOWN'
HOMETOWN. "Hometown
PERFORM BDC_FIELD USING 'ZT601-CRDATE'
SY-DATUM. "System date
PERFORM BDC_FIELD USING 'ZT601-CRTIME'
SY-UZEIT. "System time
PERFORM BDC_FIELD USING 'ZT601-CRUSER'
SY-UNAME. "System user
*-- Data input screen (After input)
*----- Screen number 0101 of program /1BCDWB/DBZT601
PERFORM BDC_DYNPRO USING '/1BCDWB/DBZT601' '0101'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/EBACK'. "Back
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZT601-CRUSER'. "Field on Cursor
*-- Table definition screen]
*----- Screen number 2000 of program SAPLSD02
PERFORM BDC_DYNPRO USING 'SAPLSD02' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'DD02D-TABCLTEXT'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=WB_BACK'. "Back
*-- The first screen of SE11
*----- Screen number 0102 of program SAPMSRD0
PERFORM BDC_DYNPRO USING 'SAPMSRD0' '0102'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RSRD1-TBMA_VAL'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BACK'.
PERFORM BDC_FIELD USING 'RSRD1-TBMA'
'X'.
PERFORM BDC_FIELD USING 'RSRD1-TBMA_VAL'
TBL_NAME.
PERFORM BDC_INSERT.
ENDLOOP.
PERFORM BDC_CLOSE.
FORM BDC_DYNPRO *
Put Program-Id, Dynpro screen number, Start point
into DBCDATA
--> PROGRAM *
--> DYNPRO *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDC_TAB.
BDC_TAB-PROGRAM = PROGRAM.
BDC_TAB-DYNPRO = DYNPRO.
BDC_TAB-DYNBEGIN = 'X'.
APPEND BDC_TAB.
ENDFORM.
FORM BDC_FIELD *
Put Field Name and Value into BDCDATA
--> FNAM *
--> FVAL *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDC_TAB.
BDC_TAB-FNAM = FNAM.
BDC_TAB-FVAL = FVAL.
APPEND BDC_TAB.
ENDFORM.
FORM bdc_process *
FORM BDC_OPEN.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'Testsession'
KEEP = 'X'
USER = SY-UNAME.
IF SY-SUBRC <> 0.
MESSAGE E006 WITH SY-SUBRC.
ENDIF.
ENDFORM.
FORM bdc_insert *
FORM BDC_INSERT.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'SE11'
TABLES
DYNPROTAB = BDC_TAB
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
MESSAGE E007 WITH SY-SUBRC.
ENDIF.
CLEAR: BDC_TAB.
ENDFORM.
FORM bdc_close *
FORM BDC_CLOSE.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE E008 WITH SY-SUBRC.
ENDIF.
ENDFORM.God I forgot to refresh Internal table after putting record into Session.
Now I'm done.
You guys be careful too. -
Error in batch input through a job (mm01)
Hi,
I have a problem with a batch input on MM01.
I want to extend material for a new center and I do it through a batch input. If I execute this batch input with F8 and in mode = 'N', it ends ok.
The problem is when I run this program with a job, the material is not added to the new center.
Can anyone help me?
Thanks,
Liliana.Hi,
Try using BAPI BAPI_MATERIAL_SAVEDATA...
Check this link for a sample code..
http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm
Thanks,
Naren -
Error exec. Background Mode a Batch-Input using KP26 Transaction Code
I have a program that build a Batch-Input based on transaction code KP26.
I encounter the following error :
Field Z-BDC02(1) is not an input field (Program : SAPLKPP2 Screen : 0112)
When executing in background I got the error and when executing in Foreground, it is OK.
I use SHDB to look at the field needed and it gave me the same field to use.
Here is an extract of my program for the field I have the issue on :
PERFORM F100_BDC_FIELD USING 'Z-BDC02(01)' I_T01-LST.
PERFORM F100_BDC_FIELD USING 'Z-BDC05(01)' I_T01-SPRED.
PERFORM F100_BDC_FIELD USING 'Z-BDC07(01)' I_T01-TOV.
PERFORM F100_BDC_FIELD USING 'Z-BDC08(01)' I_T01-TOF.
Any one have an hint to solve this ?Hi,
Just one remark: batch input is always executed in synchronous mode (hopefully, otherwise we would get many lock issues during mass updates!) Or is there something I missed?
Same thing when you use BDC_INSERT, CTU_PARAMS is ignored ([SAP note 1437811 (Batch input: BDC_INSERT parameter CTUPARAMS)|https://service.sap.com/sap/support/notes/1437811 ])
About the issue, I don't know, so maybe explain more about the context: for instance, do you run the session under a different user? (for instance, the user could be assigned a transaction/screen variant with table control variant, that protects some fields) Do you have one transaction in the batch input session or are there several ones. Try with one only to see if it works. If yes, then maybe it's something in memory that changes the "input-capability" of the field after the first transaction.
Sandra -
No batch input data for screen for VF01
Hi All,
Iam trying to to create billing document using BDC for VF01 with sales order. For single line item it is working fine and that to in Mode 'A'. But while creating invoices using multiple sales orders , Iam getting the following error.
No batch input data for screen 'SAPMV60A' '0102' . Error - 0344.
Kindly help me as I was strucked here.
My code .
PERFORM bdc_dynpro USING 'SAPMV60A' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMFK-VBELN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMFK-VBELN(01)'
gwa_bdc-vbeln.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
REFRESH messtab[].
CALL TRANSACTION 'VF01' USING bdcdata
OPTIONS FROM wa_options
MESSAGES INTO messtab.
Please <removed by moderator> help.
Thanks ,
Srikanth.A
Edited by: Thomas Zloch on Sep 15, 2011 1:47 PMHi Jurgen
LOOP AT git_bdc INTO gwa_bdc.
refresh messtab[].
PERFORM bdc_dynpro USING 'SAPMV60A' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMFK-VBELN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMFK-VBELN(01)'
gwa_bdc-vbeln.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
REFRESH messtab[].
CALL TRANSACTION 'VF01' USING bdcdata
OPTIONS FROM wa_options
MESSAGES INTO messtab.
Error message population....
REFRESH bdcdata[].
ENDLOOP.
Thanks,
Srikanth.A -
I am getting an error while running Batch input session.
While running BDC getting error that "Enter Discount Base, Automatic calculation not possible". I checked all the settings at company code level, tax code settings, document type settings. I am not getting it. While doing mannual posting the error is not coming.
Please help me on this.Hi,
While creating Material master sometime warning message will come for some materials . So while doing the LSMW Recording method it will record howmany times you are entering the "Enter" key also. So while doing batch input fome article it may stop at some point, so better run the LSMW in foreground and check were it stops exactly.
Regards
GK.
Maybe you are looking for
-
Hello, and thanks for taking the time. I'm looking forward to Apple's official support of Windows 7, and need a bit of help with a few questions I have. 1) My Macbook Pro was purchased before Snow Leopard was released, and then upgraded to Snow Leopa
-
Why can't I connect to my email when I push mail button on my device
This morning when I checked my email I received an email from my email provider ( yahoo.com ) advising me to change my password because of some suspicious activity on my account. I proceeded to sign in & change my password & was successful ( so I tho
-
Workitem is not avilable in approver inbox
HI, shopping cart is triggered with approver . but the workitem is not avilable in approvers inbox . pls let me know the possible reasons. regards venga
-
Hope someone can help. I am new to Flash CS4 - still learning - and this has had me stumped for days! Deadline is still the same though... I am redesigning a powerpoint presentation which contains a lot of graphs etc (29 slides total) and I want to a
-
Content aware fill at edge of picture
Hello all, I've just purchased and installed CS5. I love the content aware fill feature. I have an issue with it for which I'm looking for some suggestions... I have a photo with a rope that goes through that I want to eliminate. The background is