J1id bdc- error
Hi all,
i'm doing BDC for J1ID, i'm not able to process . error is coming has
J_1IGRXREF field lenght is loner then screen field. i've increased the lenght but still getting erro.
REPORT ZSPK_BDC
*REPORT ZEXCISE_PROG
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA: BEGIN OF ITAB OCCURS 0,
MATNR(20),
WERKS(5),
J_1ICHID(12),
J_1ICAPIND(40),
J_1IGRXREF(60),
J_1IDECFLAG(2),
J_1IDECDATE(10),
END OF ITAB.
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_GROUP(12) OBLIGATORY,
KEEP AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM FETCH_DATA.
IF NOT ITAB[] IS INITIAL.
PERFORM INSERT_DATA.
ENDIF.
END-OF-SELECTION.
*& Form FETCH_DATA
text
--> p1 text
<-- p2 text
FORM FETCH_DATA .
DATA : I_FILE_TABLE TYPE TABLE OF FILE_TABLE,
L_FILETABLE TYPE FILE_TABLE,
L_RC TYPE I,
L_P_DEF_FILE TYPE STRING,
L_P_FILE TYPE STRING,
L_USR_ACT TYPE I.
L_P_DEF_FILE = 'C:\'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILENAME =
FILE_FILTER =
WITH_ENCODING =
INITIAL_DIRECTORY = L_P_DEF_FILE
MULTISELECTION =
CHANGING
FILE_TABLE = I_FILE_TABLE
RC = L_RC
USER_ACTION = L_USR_ACT
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
OTHERS = 5 .
IF SY-SUBRC = 0
AND L_USR_ACT <>
CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
LOOP AT I_FILE_TABLE INTO L_FILETABLE.
L_P_FILE = L_FILETABLE.
EXIT.
ENDLOOP.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_P_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = 'ibm'
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB
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.
ENDIF.
ENDFORM. " FETCH_DATA
*& Form INSERT_DATA
text
--> p1 text
<-- p2 text
FORM INSERT_DATA .
PERFORM OPEN_GROUP.
LOOP AT ITAB.
PERFORM BDC_DYNPRO USING 'SAPMJ1ID' '0200'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RB1'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=EX'.
PERFORM BDC_FIELD USING 'RB11'
PERFORM BDC_FIELD USING 'RB1'
'X'.
PERFORM BDC_DYNPRO USING 'SAPLJ1I5' '0020'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'J_1IMTCHID-MATNR(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=NEWL'.
PERFORM BDC_DYNPRO USING 'SAPLJ1I5' '0020'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'J_1IMTCHID-J_1IDECDATE(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'J_1IMTCHID-MATNR(01)'
ITAB-MATNR.
PERFORM BDC_FIELD USING 'J_1IMTCHID-WERKS(01)'
ITAB-WERKS.
PERFORM BDC_FIELD USING 'J_1IMTCHID-J_1ICHID(01)'
ITAB-J_1ICHID.
PERFORM BDC_FIELD USING 'J_1IMTCHID-J_1ISUBIND(01)'
'X'.
PERFORM BDC_FIELD USING 'J_1IMTCHID-J_1ICAPIND(01)'
ITAB-J_1ICAPIND.
PERFORM BDC_FIELD USING 'J_1IMTCHID-J_1IGRXREF(01)'
ITAB-J_1IGRXREF.
PERFORM BDC_FIELD USING 'J_1IMTCHID-J_1IDECFLAG(01)'
ITAB-J_1IDECFLAG.
PERFORM BDC_FIELD USING 'J_1IMTCHID-J_1IDECDATE(01)'
ITAB-J_1IDECDATE.
PERFORM BDC_DYNPRO USING 'SAPLJ1I5' '0020'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'J_1IMTCHID-MATNR(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPLJ1I5' '0020'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'J_1IMTCHID-MATNR(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SAVE'.
PERFORM BDC_DYNPRO USING 'SAPLJ1I5' '0020'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'J_1IMTCHID-MATNR(02)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BACK'.
PERFORM BDC_DYNPRO USING 'SAPLJ1I5' '0020'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'J_1IMTCHID-MATNR(02)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BACK'.
PERFORM BDC_DYNPRO USING 'SAPMJ1ID' '0200'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/EEXIT'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EXCISE'.
ENDLOOP.
PERFORM BDC_TRANSACTION USING 'J1ID'.
PERFORM CLOSE_GROUP.
ENDFORM. " INSERT_DATA
*& Form OPEN_GROUP
text
FORM OPEN_GROUP.
SKIP.
WRITE: /(20) 'Create group'(I01), P_GROUP.
SKIP.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = P_GROUP
USER = SY-UNAME
KEEP = KEEP.
WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
(12) 'returncode:'(I05),
SY-SUBRC.
ENDFORM. "OPEN_GROUP
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.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM. "BDC_FIELD
*& Form BDC_TRANSACTION
Start new transaction *
-->tcode transaction code *
FORM BDC_TRANSACTION USING TCODE.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = BDCDATA.
REFRESH BDCDATA.
WRITE: /(25) 'BDC_INSERT'(I03),
TCODE,
(12) 'returncode:'(I05),
SY-SUBRC.
ENDFORM. "BDC_TRANSACTION
*& Form CLOSE_GROUP
end batchinput session *
FORM CLOSE_GROUP.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
(12) 'returncode:'(I05),
SY-SUBRC.
SKIP 1.
endform.
pls help me
regards
Suprith
But in the standard table, the length is only 1. Check the table:J_1IMTCHID. In the table,it is only a single digit value.
Number of Goods Receipts per Excise Invoice is the field name. So, it is only single digit not more than that.
Check the order of the fields in the internal table and the the flat file are same. And debug the program to see if the correct values are coming.
Vishwa.
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 while executing in background
Hello,
I am run a BDC to upload Assessable value in J1ID transaction. When I am running the program in background it gives "Runtime error SAPSQL_ARRAY_INSERT_DUPREC has occurred" But when I am running the same in foreground mode it is running perfectly. Since the data volume is huge I cannot run the program in foreground. can anyone guide me how to correct the program to prevent background errors.
Thanks,
Anil N.Hi, ref SAP NOTE 668466
When you load attributes or texts, data records are usually inserted in the master data tables of the characteristic using an array insert statement (P, Q, X, Y, T tables). This results in a SAPSQL_ARRAY_INSERT_DUPREC runtime error if data records that are to be inserted and that relate to the unique primary key of the relevant database table already exist in this table. The following possible reasons are currently known for the occurrence of the SAPSQL_ARRAY_INSERT_DUPREC runtime error:
1. Data inconsistencies in the master data tables of the characteristic
SAPSQL_ARRAY_INSERT_DUPREC runtime errors or RSDMD 199 may occur if the data appears in an inconsistent status in the master data tables of the characteristic before you load attributes or texts. Notes 323140, 566044, 592757 and 599269 describe this (among other things) in more detail.
2. Parallel loading of nondisjunct data packages
If master data attributes are loaded over several dialog processes that are running in parallel, you must guarantee that the data packages of the relevant request are strictly disjunct concerning the characteristic value. This means that all data records that belong to a certain characteristic value may only be contained in a single data package. If data records of a certain characteristic value are distributed over several data packages, this may cause conflicts during the parallel loading of these packages when the master data tables are accessed and this may result in SAPSQL_ARRAY_INSERT_DUPREC runtime errors.
The same conditions that apply to loading attributes also apply to loading language-independent master data texts. If language-dependent texts are loaded in parallel, the data packages must be disjunct in relation to the combination of characteristic value and language indicator.
Note 566044 also describes the problematic nature of nondisjunct data packages or duplicate or overlapping data records.
3. Parallel loading of time-dependent attributes or texts
When you load time-dependent attributes or texts, a data record that is to be loaded is assigned to a characteristic value and also specifically to a time interval within which the contained attribute values or texts are valid. For this reason, requests for loading time-dependent attributes or texts typically contain several data records for each characteristic value. If data records of a certain characteristic value or the combination of characteristic value and language indicator are distributed over several data packages, this may (as already explained) cause conflicts when the master data tables are accessed and may result in SAPSQL_ARRAY_INSERT_DUPREC runtime errors or error message RSDMD 199. -
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
Maybe you are looking for
-
How to prevent the replication of service order from CRM to R/3
Hi, I create a service order and it displays in SMW01. Does it mean that system tries to replicate it from CRM to R/3? I have deleted the subscription in SMOEAC while publication of BUS_TRANS_MSG can't be deleted. Is there any other configuration af
-
Release Strategy in purchase order document type
Hi Gurus.. I'm tring to tweak the single RS in the system. I've set the charcteristic using table CEKKO field BSART, restriction 032, I've set two document types as the Characteristic Value (ZLOG - ZADM). Then I´ve set the class with this characteris
-
Can I change the colors used in iOS7?
Can I change the colors used in iOS7? The white background makes reading text and numbers very difficult. Especially if the are in light gray.
-
hi team i have a report, where in my report, Data being mismatch with r/3 data my question is 1.how we will do reconcellation with r/3 data 2.what is agregated level 3.how we will run the statistical setup in lo can u explain with step by step how we
-
Is it possible to take a print from the Portal
Hello All, Is it possible to take a print out from the Portal. Let me be more clear about the case: We have designed some charts (Time Scatter) in our WebDynpro projects and displayed it in the Portal. Now, the Team is enquiring if the Print out of