BDC error
is there any other method to trace the error in the BDC-CALL TRANSACTION without using BDCMSGCOLL structure.
Hi Krishna
As said by Laxman above, just use the function module 'FORMAT_MESSAGE'.
Be sure that you uncomment all the exporting parameters, and declare the imorting parameter as TYPE T100-TEXT.
U will get the message text in the importing parameter.
Reward points if helpful
Regards
Similar Messages
-
Any existing program to list before and after BDC error?
Looking for a way to report any BDC errors and show before and after its been corrected.
Hi,
Before making correction:-->
!. If you are using call transaction , then you can all errors in BDCMSGCOLL internal table
and use fm MESSAGE_PREPARE to generate message texts
2. If you are using session method then you have error log SM35.
After making coorection i don't think you have anyway to capture corrected errors
a® -
BDC error in Upgrade proj.
Dear all,
I am on a upgrade proj. from 4.5 to ECC 6.0. when i check an object I got a kind of BDC error like 'ERROR TYPE ==> 4 ( SCREEN MISSING IN TARGET SYSTEM )' along with program name and screen number. please advice me in solving this error.
Thanks.
Naresh.Hi Naresh,
That one of the task when you go for an upgrade.
You have to redo the recording part again for all BDC programs
Try to change it to BAPI if you have suitable BAPI.
Reward points if helpful
Thanks
venki -
BDC Error Session and Database update??
Hi all,
I am having Query about BDC Error Session. If I see the log of Error Session, then few Transactions are processed and few are in incorrect status.
Those transaction, which are processed, Does it mean that it has updates the database successfully or Error Session will never update the Database?
Thanks in advance.Thanks for your reply
Message was edited by: Vipin Nagpal
Message was edited by: Vipin Nagpal -
Hi guys,
Anybody have program or utility to pick up the BDC Errors from Zprograms.
I want to know number of BDC errors(Due to Screen change/Field change/etc) exists in set of zprograms.
Appreciable if Listing of BDC errors and error count can be produced by it.
reference please.
Thanks.
Ambi.Hi,
better use :
CALL TRANSACTION tcode USING bdcdata MODE mod MESSAGES INTO etab.
if sy-subrc <> 0.
-> analyse error-table etab
A. -
BDC error CO assingnment object belong to company code A800 not A900
Hi,
I am getting BDC error 'CO assingnment object belong to company code A800 not A900'.
Please any one suggest the reason for this.
Thakns in advance.Hi,
you are processing a BDC-session for company code A900 with a CO-account assignment for comp. code A800 and your system does not allow cross-company code postings. Check the co-object and correct it.
Best regards, Christian -
BDC Error - Codepage could not be determined
Hello Gurus,
We are having a problem with BDC in transaction VF01.
The return message is FES-025 "Codepage could not be determined".
First of all the details and what have been done so far:
- The funcion module with BDC is called by an EDI message that is send on the creation of the SD Invoice.
- In Online mode, no errors are raised;
- The errors are only raised when the program runs in background - Manual processing of EDI message via T-Code WE19 (online mode) runs with no problems;
- In DEV enviroment, everything runs smoothly (both online and background modes) and we achieve the required result;
- In QAS enviroment, with exacly the same versions of code, the background process fails;
- Both DEV and QAS work on the same physical machine, on different instances.
I've searched quite a lot about this error and most results talk about the usage/call of GUI_UPLOAD or GUI_DOWNLOAD. We are NOT using this type of funcions in our code (or something that would connect to the client).
Any ideias?
Thanks in advance, best regards,
João ArgêncioSome additional informations:
- The sistem is non-unicode;
- The EDI message source and destination are the same machine (inter-company process);
- The user assiciated in IDoc Config has SAP_ALL privileges;
- Both systems are in the same release levels (ECC 5);
- All IDoc configuration is equal in both DEV and QAS instances.
If you need any additional information just let me know.
Thanks oin advance, best regards,
João Argêncio -
BDC error BM302 : Internal unit &, language & is not maintained
Hi Experts,
I have Unit of measurements defined as below in T006A Tables ( Configured through CUNI tcode)
SPRAS MSEHI MSEH3 MSEH6 MSEHT MSEHL
EN UNT UNT UNT UNIT Unit
HU UNT DRB DRB Darab Darab
Through BDC Prpgram i have created an inforecord ( using ME11 transaction ), where Logon Language = HU. It is created successfully. When i try to open the created info record using ME12, the unit ( EINA-LMEIN) is displayed as '**' and it throws message "Internal unit DRB, language HU is not maintained ". When i Checked in database EINA-LMEIN is saved as '**'.
But when i create the Info record manually in ME11, No issues .The database EINA-LMEIN is correctly saved as 'UNT'.
I couldn't figure out the issue , whether problem is in my BDC program or Language dependent configuration of the unit in CUNI. Please help in solving this issue , Am i missing something ?
Thanks in advance.
Regards,
MuraliHi Murali,
You might be missing some more configuration (T table entries). To determine what that is -
Process the info-record using ME12
Start debugging "/h"
Once debugging starts - place Breakpoint At MESSAGE statement
F8
Program control will stop at every message triggered and one of them would be you message. Check the code around the message (and call stack if required) and you might see the reason for the error
Cheers,
Aditya -
hi,
in BDC,
after uploading data from flat file,
how to find if there are any errors in flat file,
before starting the session.Hi,
You have to create internal tables for all the mandatory fields. see the following code :
I am giving an example for XK01 Transaction.
TYPES:BEGIN OF TY_XK01,
LIFNR(10) TYPE C , "VENDOR'S ACCOUNT NUMBER
BUKRS(4) TYPE C , "COMPANY CODE
EKORG(4) TYPE C , "PURCHASING ORGANISATION
KTOKK(4) TYPE C , "VENDOR ACCOUNT GROUP
NAME1(35) TYPE C , "NAME1
SORTL(10) TYPE C , "SORT FIELD
STRAS(35) TYPE C , "STREET
PSTLZ(10) TYPE C , "POSTAL CODE
ORT01(35) TYPE C , "CITY
LAND1(3) TYPE C , "COUNTRY KEY
REGIO(3) TYPE C , "REGION
TIME_ZONE(6) TYPE C , "ADDRESS TIME ZONE
LANGU(1) TYPE C , "LANGUAGE KEY
TELF1(16) TYPE C , "TELEPHONE NUMBER
TELFX(31) TYPE C , "FAX NUMBER
SMTP_ADDR(241) TYPE C , "E-MAIL ADDRESS
URI_SCREEN(132) TYPE C , "UNIFORM RESOURCE LOCATOR
AKONT(10) TYPE C , "RECONCILITATION ACCOUNT
ZUAWA(3) TYPE C , "KEY FOR SORTING ACCORDING TO ASSIGNMENT NUMBERS
MINDK(3) TYPE C , "MINORITY INDICATORS
ALTKN(10) TYPE C , "PREVIOUS MASTER RECORD NUMBER
ZTERM(4) TYPE C , "TERMS OF PAYMENT KEY
ZWELS(10) TYPE C , "LIST OF THE PAYMENT METHODS
WAERS(5) TYPE C , "PURCHASE ORDER CURRENCY
END OF TY_XK01,
BEGIN OF TY_LIFNR,
LIFNR(10) TYPE C ,
END OF TY_LIFNR,
BEGIN OF TY_BUKRS,
BUKRS(4) TYPE C ,
END OF TY_BUKRS,
BEGIN OF TY_EKORG,
EKORG(4) TYPE C ,
END OF TY_EKORG,
BEGIN OF TY_KTOKK,
KTOKK(4) TYPE C ,
END OF TY_KTOKK,
BEGIN OF TY_LAND1,
LAND1(3) TYPE C ,
END OF TY_LAND1,
BEGIN OF TY_LANGU,
LANGU(1) TYPE C ,
END OF TY_LANGU,
BEGIN OF TY_AKONT,
AKONT(10) TYPE C ,
END OF TY_AKONT,
BEGIN OF TY_ZUAWA,
ZUAWA(3) TYPE C ,
END OF TY_ZUAWA,
BEGIN OF TY_MINDK,
MINDK(3) TYPE C ,
END OF TY_MINDK,
BEGIN OF TY_WAERS,
WAERS(5) TYPE C ,
END OF TY_WAERS.
DATA : I_XK01 TYPE TABLE OF TY_XK01, "FOR HOLDING DATA FROM FLAT FILE
I_SUCCMESG TYPE TABLE OF TY_MESG, "FOR SUCCESS RECORDS DETAILS
I_ERRMESG TYPE TABLE OF TY_MESG, "FOR ERROR RECORDS DETAILS
I_ERROR TYPE TABLE OF TY_ERROR,
I_LIFNR TYPE TABLE OF TY_LIFNR,
I_BUKRS TYPE TABLE OF TY_BUKRS,
I_EKORG TYPE TABLE OF TY_EKORG,
I_KTOKK TYPE TABLE OF TY_KTOKK,
I_LAND1 TYPE TABLE OF TY_LAND1,
I_LANGU TYPE TABLE OF TY_LANGU,
I_AKONT TYPE TABLE OF TY_AKONT,
I_ZUAWA TYPE TABLE OF TY_ZUAWA,
I_MINDK TYPE TABLE OF TY_MINDK,
I_WAERS TYPE TABLE OF TY_WAERS,
I_FINALMESG TYPE TABLE OF TY_ERROR,
I_MESG TYPE TABLE OF TY_MESG.
*& WORK AREA DECLARATION
DATA: WA_XK01 TYPE TY_XK01, "FOR HOLDING DATA FROM FLAT FILE
WA_SUCCMESG TYPE TY_MESG, "FOR SUCCESS RECORDS DETAILS
WA_ERRMESG TYPE TY_MESG, "FOR ERROR RECORDS DETAILS
WA_ERROR TYPE TY_ERROR,
WA_LIFNR TYPE TY_LIFNR,
WA_BUKRS TYPE TY_BUKRS,
WA_EKORG TYPE TY_EKORG,
WA_KTOKK TYPE TY_KTOKK,
WA_LAND1 TYPE TY_LAND1,
WA_LANGU TYPE TY_LANGU,
WA_AKONT TYPE TY_AKONT,
WA_ZUAWA TYPE TY_ZUAWA,
WA_MINDK TYPE TY_MINDK,
WA_WAERS TYPE TY_WAERS,
WA_MESG TYPE TY_MESG,
WA_FINALMESG TYPE TY_ERROR.
INITIALIZATION.
SELECT LIFNR FROM LFA1 INTO TABLE I_LIFNR.
SELECT BUKRS FROM T001 INTO TABLE I_BUKRS .
SELECT EKORG FROM T024E INTO TABLE I_EKORG .
SELECT KTOKK FROM T077K INTO TABLE I_KTOKK .
SELECT LAND1 FROM T005 INTO TABLE I_LAND1.
SELECT SPRAS FROM T002 INTO TABLE I_LANGU.
SELECT SAKNR FROM SKA1 INTO TABLE I_AKONT .
SELECT ZUAWA FROM TZUN INTO TABLE I_ZUAWA .
SELECT MINDK FROM T059M INTO TABLE I_MINDK .
SELECT WAERS FROM TCURC INTO TABLE I_WAERS.
LOOP AT I_XK01 INTO WA_XK01.
TRANSLATE WA_XK01-LIFNR TO UPPER CASE.
READ TABLE I_LIFNR INTO WA_LIFNR WITH KEY LIFNR = WA_XK01-LIFNR.
IF SY-SUBRC = 0 .
CONCATENATE WA_MESG-MESG TEXT-100 WA_XK01-LIFNR TEXT-101 ' , ' INTO WA_MESG-MESG.
ENDIF.
TRANSLATE WA_XK01-BUKRS TO UPPER CASE.
READ TABLE I_BUKRS INTO WA_BUKRS WITH KEY BUKRS = WA_XK01-BUKRS.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-102 WA_XK01-BUKRS TEXT-103 ' , ' INTO WA_MESG-MESG.
ENDIF.
TRANSLATE WA_XK01-EKORG TO UPPER CASE.
READ TABLE I_EKORG INTO WA_EKORG WITH KEY EKORG = WA_XK01-EKORG.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-104 WA_XK01-EKORG TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
TRANSLATE WA_XK01-KTOKK TO UPPER CASE.
READ TABLE I_KTOKK INTO WA_KTOKK WITH KEY KTOKK = WA_XK01-KTOKK.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-105 WA_XK01-KTOKK TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
TRANSLATE WA_XK01-LAND1 TO UPPER CASE.
READ TABLE I_LAND1 INTO WA_LAND1 WITH KEY LAND1 = WA_XK01-LAND1.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-106 WA_XK01-LAND1 TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
TRANSLATE WA_XK01-LANGU TO UPPER CASE.
READ TABLE I_LANGU INTO WA_LANGU WITH KEY LANGU = WA_XK01-LANGU.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-107 WA_XK01-LANGU TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
READ TABLE I_AKONT INTO WA_AKONT WITH KEY AKONT = WA_XK01-AKONT.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-108 WA_XK01-AKONT TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
READ TABLE I_ZUAWA INTO WA_ZUAWA WITH KEY ZUAWA = WA_XK01-ZUAWA.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-109 WA_XK01-ZUAWA TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
READ TABLE I_MINDK INTO WA_MINDK WITH KEY MINDK = WA_XK01-MINDK.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-110 WA_XK01-MINDK TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
TRANSLATE WA_XK01-WAERS TO UPPER CASE.
READ TABLE I_WAERS INTO WA_WAERS WITH KEY WAERS = WA_XK01-WAERS.
IF SY-SUBRC <> 0 .
CONCATENATE WA_MESG-MESG TEXT-111 WA_XK01-WAERS TEXT-103 ',' INTO WA_MESG-MESG.
ENDIF.
append wa_mesg to err_mesg.
endloop.
I am populating the error messages into workarea using concatenate statement.
Hope this solves the problem.
Reward points if helpful.
Thanks and Regards,
Narayana. -
Hi Friends,
In Tcode - F110, when we submit Run Date and Identification, the templete pop-ups in the Parameter Tab.
I've reqirement to change all the values of
Next payment date (Next/p Date) field (based on selection perameter) in the Table Control under the Tab- Parameter.
I have developed the BDC program by recording the transaction F110. This program is changeing the first 3 line items and after that it is throughing an error 'screen does not find the filed' (Below is the program). Please help me in correcting this issue.
Thanks in Advance,
Saya
perform bdc_dynpro using 'ZSAPF110V' '0200'.
perform bdc_field using 'BDC_CURSOR' 'F110V-LAUFI'.
perform bdc_field using 'BDC_OKCODE' '=PABE'.
perform bdc_field using 'F110V-LAUFD' w_laufd.
perform bdc_field using 'F110V-LAUFI' w_laufi.
End of screen 1.
perform bdc_dynpro using 'ZSAPF110V' '0200'.
perform bdc_field using 'BDC_OKCODE' '=CP'.
perform bdc_field using 'BDC_CURSOR' 'F110C-BUDAT'.
perform bdc_field using 'F110C-BUDAT' w_laufd.
perform bdc_field using 'F110C-GRDAT' w_nedat.
End of screen 2.
perform bdc_dynpro using 'ZSAPF110V' '1108'.
perform bdc_field using 'BDC_CURSOR' 'F110V-COPYD'.
perform bdc_field using 'BDC_OKCODE' '=GO'.
perform bdc_field using 'F110VCOPYD' w_prdat.
perform bdc_field using 'F110V-COPYI' w_laufi.
perform bdc_field using 'F110V-XFKTV' c_mark.
End of screen 3.
perform bdc_dynpro using 'ZSAPF110V' '0200'.
perform bdc_field using 'BDC_OKCODE' '=STA'.
perform bdc_field using 'BDC_CURSOR' 'F110C-BUDAT'.
perform bdc_field using 'F110C-BUDAT' w_laufd.
perform bdc_field using 'F110C-GRDAT' w_nedat.
perform bdc_field using 'F110V-NEDAT(01)' w_nedat2.
perform bdc_field using 'F110V-NEDAT(02)' w_nedat2.
perform bdc_field using 'F110V-NEDAT(03)' w_nedat2.
perform bdc_field using 'F110V-NEDAT(04)' w_nedat2.
perform bdc_field using 'F110V-NEDAT(05)' w_nedat2.
End of screen 4.
perform bdc_dynpro using 'SAPLSPO1' '0100'.
perform bdc_field using 'BDC_OKCODE' '=YES'.
End of screen 5.
perform bdc_dynpro using 'ZSAPF110V' '0200'.
perform bdc_field using 'BDC_CURSOR' 'F110V-LAUFD'.
perform bdc_field using 'BDC_OKCODE' '=VOEX'.
perform bdc_dynpro using 'ZSAPF110V' '1106'.
perform bdc_field using 'BDC_CURSOR' 'F110V-XSTRF'.
perform bdc_field using 'BDC_OKCODE' '=EP'.
perform bdc_field using 'F110V-XSTRF' c_mark.
call transaction c_trans using t_bdcdata mode 'N' update 'S' .Hi kris,
Per my understand when the program is changing the 4th record in the table control then the transaction is not finding the field. Because 4th and 5 th records are displayed after scrolling down. How do I handle this records?
perform bdc_field using 'F110V-NEDAT(04)' w_nedat2.
perform bdc_field using 'F110V-NEDAT(05)' w_nedat2.
Thanks & Regards,
Saya -
i did one bdc program, it's running correctly but data not upload. so how to lanalyze the error.
Dear
you can find error with following link
How to find errors from BDC log
Regards -
BDC Error in background 'The difference is too large for clearing'
Hi,
In foreground the BDC session runs perfectly and errors only when the program is running in the background.
In background, the following messages are captured.
Select line items first of all FB05 1 SAPMF05A 0300
163 items were selected FB05 1 SAPMF05A 0710
The difference is too large for clearing FB05 1 SAPDF05X 3100
No batch input data for screen SAPDF05X 3100 FB05 1 SAPDF05X 3100
But, in real BDCDATA contains all the above said screens. Kindly note the above comes as a success message in the background and does not appear in the foreground.
Any response is highly appreciated.
AshishHello Ashish,
I suggest you to run FB05 for clearance for the same data and check if this message is encountered.
Please contact your functional guy and check the business reasons about this message.
Kindly go through the below links
http://scn.sap.com/thread/985136
https://scn.sap.com/thread/472069
Thanks -
Bdc error message in call transaction
Hi all,
Can anyone send me a program where they have used the ' BDCMSGCOLL ' structure and format_message FM. I need only complete program, please don't send sample codings or just a part of coding.
Points are assured.
Thanks and regards,
subbu.Hi,
Here is the BDC recording program for updating a custom field (out of 3 custom fields) in CALL TRANSACTION method depends upon which value is given in text file, based on that the corresponding radio button will be selected for that PERNR in PA30.(For 3 custom fields in PA0007) created.
Flat file contains 1) PENR 2) Custom field1 3) CF2 4) CF3.
The values are like [ '636363', ' ', 'X', ' ' ] .
Here is the complete program using BDCMSGCOLL structure.
report Y0007_BDC NO STANDARD PAGE HEADING MESSAGE-ID RP LINE-SIZE 180." LINE-COUNT 28.
DATA DECLARATION *
TYPES : BEGIN OF TY_0007,
PERNR TYPE PERNR, " PERNR
SCHKZ TYPE SCHKN, " Work Schudule
ZTERF TYPE PT_ZTERF, " Time Magmt Status
R1 TYPE C,
R2 TYPE C,
R3 TYPE C,
END OF TY_0007.
DATA : INT_0007 TYPE STANDARD TABLE OF TY_0007 WITH HEADER LINE,
WA_0007 TYPE TY_0007.
DATA: P_FNAME TYPE IBIPPARMS-PATH.
DATA : begin of int_out occurs 0,
pernr type persno,
mesg(300),
end of int_out.
DATA : BEGIN OF int_err occurs 0,
pernr type persno,
mesg(300),
end of int_err.
include bdcrecx1.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS : P_PATH TYPE string.
SELECTION-SCREEN END OF BLOCK B.
SELECTION-SCREEN END OF BLOCK A.
CALL FUNCTION FOR INPUT FILE NAME *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_path.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FNAME.
p_path = p_fname.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = P_PATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = INT_0007
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform open_group.
*Looping pernr values*
LOOP AT INT_0007 INTO WA_0007.
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*INSERTING THE PERNR VALUE*
perform bdc_field using 'RP50G-PERNR'
WA_0007-PERNR. "'00001011'.
perform bdc_field using 'RP50G-TIMR6'
'X'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-CHOIC'.
perform bdc_field using 'RP50G-CHOIC'
'0007'.
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-PERNR'.
perform bdc_field using 'BDC_OKCODE'
'=INS'.
perform bdc_field using 'RP50G-PERNR'
WA_0007-PERNR. "'1011'.
perform bdc_field using 'RP50G-TIMR6'
'X'.
perform bdc_field using 'RP50G-CHOIC'
'Planned Working Time - 0007'.
perform bdc_dynpro using 'MP000700' '2000'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_field using 'P0007-BEGDA'
'12/01/2007'.
perform bdc_field using 'P0007-ENDDA'
'12/31/9999'.
*INSERTING THE WORK SCHEDULE*
perform bdc_field using 'P0007-SCHKZ'
WA_0007-SCHKZ. "'N12'.
perform bdc_field using 'P0007-ZTERF'
WA_0007-ZTERF. "'1'.
*INSERTING THE OVERTIME CLASS*
IF WA_0007-R1 = 'X'.
perform bdc_field using 'ZHQ0007-OVT_ELGBLE'
'X'.
ELSEIF WA_0007-R2 = 'X'.
perform bdc_field using 'ZHQ0007-OVT_NOTELG'
'X'.
ELSEIF WA_0007-R3 = 'X'.
perform bdc_field using 'ZHQ0007-OVT_TMPELG'
'X'.
ENDIF.
*BDC output for transaction code*
perform bdc_transaction using 'pa30'. (STD)
perform f_bdc_output using 'pa30'. (write on our own)
ENDLOOP.
**Writing the output**
PERFORM f_write_output.
perform close_group.
*& Form f_write_output
text
--> p1 text
<-- p2 text
FORM f_write_output .
*For Successfull Records*
if int_OUT[] IS NOT INITIAL.
WRITE : /50 TEXT-004 color 4.
write : / sy-uline.
LOOP AT INT_OUT.
WRITE : /40 int_out-pernr,50 '-->',54 int_out-mesg.
ENDLOOP.
ENDIF.
write / sy-uline.
SKIP 2.
*For Error records*
if int_err[] IS NOT INITIAL.
WRITE /53 text-005 color 6.
write / sy-uline.
LOOP AT int_err.
write :/40 int_err-pernr,50 '-->',54 int_err-mesg.
ENDLOOP.
endif.
write / sy-uline.
ENDFORM. " f_write_output
*& Form f_bdc_output
text
-->P_0369 text
FORM f_bdc_output USING VALUE(P_0369).
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
REFRESH MESSTAB.
*Capturing the output message*
CALL TRANSACTION 'PA30' USING BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO MESSTAB.
L_SUBRC = SY-SUBRC.
IF SMALLLOG <> 'X'.
LOOP AT MESSTAB.
*Selection for capturing the text for records*
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
*Moving the text from T100 to local variable*
L_MSTRING = T100-TEXT.
IF ( MESSTAB-MSGTYP = 'W' or
MESSTAB-MSGTYP = 'S' OR
MESSTAB-MSGTYP = 'E' ).
*Moving the success records pernr and text to internal table*
IF MESSTAB-MSGTYP = 'S'.
INT_OUT-PERNR = WA_0007-PERNR.
INT_OUT-MESG = L_MSTRING.
APPEND INT_OUT.
CLEAR INT_OUT.
*Moving the success records pernr and text to internal table*
ELSEIF MESSTAB-MSGTYP = 'E'.
*For getting the error text exactly*
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.
INT_ERR-PERNR = WA_0007-PERNR.
INT_ERR-MESG = L_MSTRING.
APPEND INT_ERR.
CLEAR INT_ERR.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
SKIP.
ENDIF.
*& CALL FUNCTION 'BDC_OPEN_GROUP'
IF L_SUBRC <> 0 AND E_GROUP <> SPACE.
IF E_GROUP_OPENED = ' '.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = E_GROUP
USER = E_USER
KEEP = E_KEEP
HOLDDATE = E_HDATE.
E_GROUP_OPENED = 'X'.
ENDIF.
*& CALL FUNCTION 'BDC_INSERT'
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'PA30'
TABLES
DYNPROTAB = BDCDATA.
*& CALL FUNCTION 'BDC_CLOSE_GROUP'
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.
ENDIF.
REFRESH BDCDATA.
ENDFORM. " f_bdc_output
Hope it helps u..
Kindly reward points if helpful
Regards,
Shanthi -
Running one BDC in that one condition has given if that condition is not satisfy then raise one Error message. For example i am running that BDC with 10 records.
First 3 records run successfully but at the 4th record it gives error then program is stocking there only. Not running the remaining records and not show successful records log as per the coding. Its not even going back also.
Running one BDC in that its calling transaction In that transaction one user-exit in that its calls sub screen in that exit one condition has given if that condition is not satisfy then raise one Error message.
For example I am running that BDC with 5 records.
First 2 records run successfully but at the 4th record it give error then program is stocking where subscreen calls and error message popup come if click cancel button at popup and sub screen it going to transaction if I click back button then again it comes to error popup screen.its not going out of the error popup and transaction loop.How to rectify this.what time of error message are you running, by that I mean what type?
is the error popping up the screen? and if it does then are you running your batch process in the foreground? If you are, try running it in the background.
Warren -
How to store BDC error messages into oracle database table?
Hello Experts,
I have a peculier requirement wherein I need to store the error messages occured while executing the transaction using BDC (Call Transaction Method) in an Oracle Database table format. Is that possible, if yes, how?
Thanks in advance.Hi,
Structure of BDCMSGCOLL.
TCODE -> BDC Transaction code
DYNAME -> Batch input module name
DYNUMB -> Batch input screen number
MSGTYP ->Batch input message type
MSGSPRA -> Language ID of a message
MSGID -> Batch input message ID
MSGNR -> Batch input message number
MSGV1 -> Variable part of a message
MSGV2 -> Variable part of a message
MSGV3 -> Variable part of a message
MSGV4 -> Variable part of a message
FLDNAME -> Field name
Ex :
DATA : BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE,
BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
CALL TRANSACTION 'MM01' USING BDCDATA MODE N UPDATE S MESSAGES INTO BDCMSGCOLL.
IF SY-SUBRC 0.
PERFORM ERR.
CLEAR I_MSG.
REFRESH I_MSG.
ENDIF.
*& Form ERR
text
--> p1 text
<-- p2 text
form ERR .
DATA V_MSG(255) TYPE C.
READ TABLE I_MSG WITH KEY MSGTYP = 'E'.
IF SY-SUBRC = 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = I_MSG-MSGID
LANG = 'E'
NO = I_MSG-MSGNR
V1 = I_MSG-MSGV1
V2 = I_MSG-MSGV2
V3 = I_MSG-MSGV3
V4 = I_MSG-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE V_MSG. " Error Message Displayed Here.
CLEAR V_MSG.
ENDIF.
endform. " ERR
hope this will help you.
Reward if found helpfull,
Cheers,
Chaitanya.
Maybe you are looking for
-
Sharing certain groups in address book rather than the whole address book
Hi I haven't got server yet in our office but we are looking to do this. Currently we just share calendars and other bits and pieces but I'm looking to get server in place. Sharing the address book requires giving a user our iCloud password and letti
-
Problem with a digital copy what should i do?
received the message "an unknown error occurred (-50)" when down loading a digital copy and it won't finish the download I keep getting the same message. My code was good the download started but at 70mb It stopped and I got the message. I've down lo
-
I'm attepmting to upgrade my Mother's iphone4 to the ios7.4
and I can't get past the 'connect to iTunes' screen with the picture of the cable and music notes. I've reset the phone and done the 'restore' settings and still can't get past the 'connect to iTunes' screen. Can anyone help please??????
-
Why do I keep getting "The procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll" when I start up my computer?
-
Hi I have a problem with SQLException and a unicode environment ( env was created with Environment::createEnvironment("OCCIUTF16","OCCIUTF16") ): what() from std::exception and getMessage() only give a "0" as message. getUStringMessage() contains the