BDC error messages
Hi Guys
how can we trab error messages in BDC . We make use of BDCMSGCOLL .
can anybody expalin me how can we capture them , I have to display the messages after running the BDC. i am running BDC on transaction sm30 .. view name is vusrextid. Add new enties ,type is NT and put external users as asian\hhh
then SAPUSER then click activate and lastly click save . Waiting for reply.
Hi,
Use:
internal table to handle messages
DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_MESG(50).
CALL TRANSACTION 'MM01' USING IT_BDCDATA MODE 'N' UPDATE 'S'
MESSAGES INTO IT_MESSAGES.
all messages wiull come into it_messages and display them like:
FORM ERROR_MESSAGES.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = '-D'
IMPORTING
MSG = V_MESG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
LOOP AT IT_MESSAGES WHERE MSGTYP = 'E'.
WRITE : / 'Message :'(I06) ,V_MESG.
CLEAR IT_MESSAGES.
ENDLOOP.
reward if useful
regards,
Anji
Similar Messages
-
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. -
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 -
Hello,
I am uploading data for FB05 using bdc for 10 customers.but if i get error for the 1st customer it stops further processing for other customer.Can i do something like it gives list of errors for customers which are having fault other should be uploaded finely.i am using call transaction for this.hi,
check this piece of code..
*Calling Transaction FB50 .
call transaction 'FB50' using BDCDATA mode 'N' messages into MESSTAB.
*Reading Internal Table MESSTAB.
read table MESSTAB.
if SY-SUBRC = 0.
*Selecting TEXT From Table T100 Into Variable V_TEXT.
select single TEXT into V_TEXT from T100 where SPRSL = MESSTAB-MSGSPRA
and ARBGB = MESSTAB-MSGID
and MSGNR = MESSTAB-MSGNR.
if SY-SUBRC = 0.
V_LMSTRING = V_TEXT.
if V_LMSTRING cs '&1'.
replace '&1' with MESSTAB-MSGV1 into V_LMSTRING.
replace '&2' with MESSTAB-MSGV2 into V_LMSTRING.
replace '&3' with MESSTAB-MSGV3 into V_LMSTRING.
replace '&4' with MESSTAB-MSGV4 into V_LMSTRING.
else.
replace '&' with MESSTAB-MSGV1 into V_LMSTRING.
replace '&' with MESSTAB-MSGV2 into V_LMSTRING.
replace '&' with MESSTAB-MSGV3 into V_LMSTRING.
replace '&' with MESSTAB-MSGV4 into V_LMSTRING.
endif.
condense V_LMSTRING.
*Checking The Message Type and Display The Message Accordingly.
if MESSTAB-MSGTYP = 'E'.
V_ERROR = V_ERROR + C_INCREMENT.
IT_RESULT-MEGTYPE = 'Error'.
IT_RESULT-MESSAGE = V_LMSTRING.
endif.
if MESSTAB-MSGTYP = 'S'.
V_SUCCESS = V_SUCCESS + C_INCREMENT.
IT_RESULT-MEGTYPE = 'Successful'.
IT_RESULT-MESSAGE = V_LMSTRING.
endif.
else.
write: / MESSTAB.
endif.
endif.
*Appending Table IT_RESULT.
append IT_RESULT.
*Delete Rows of Internal Table MESSTAB.
refresh MESSTAB.
*Clear Header of MESSTAB.
clear MESSTAB.
endloop.
thanks
Ashu SIngh -
Error Message from BDC program
Hi all,
I'm facing the following situation: when i run a call transaction program for VL01:
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL TRANSACTION 'VL01N' USING bdcdata MESSAGES into MESSTAB.
sometimes when an item has no stock, i get the error message:
MSGTYP = E
MSGID = VL
MSGNR = 643
MSGV1 = '1'
MSGV2 = 'UN'.
MSGV3 = ''
MSGV4 = ''
the problem: when i compose this message with FM - FORMAT_MESSAGE, i dont get the material code, to wich the loss os stock error referes to, since is not returned from call transaction execution (in messtab). How can i determine to which material code the error refers to ?
As anyone faced the same situation ?
Best regards,
Pedro CastroIf you know the material number which you passed to the BDC, you can simply use that, if you are passing mulitple materials for one call of the BDC, then I don't think you can know which material it is erroring on if the message does not bring it back.
Regards,
RIch Heilman -
How to handle error messages in BDC background mode
Hi experts,
I got one problem in BDC, We are uploading data throgh BDC program,that program is calling Standard Batch Input programs,
Now we got one requirement, i.e., In some special cases we have to send one message as a error message.I handled this in foreground but, how to handle this in background.Hi,
if session is being used
automatically the log will begenereated in the sm35 transaction
but if call transaction is used
put all the error messages in the applicationserver using
open data set
and after the exectionof the program in the background
you have to run another progam which reads the data stroed inthe application server
that also with open data set only...
thanks & regards,
Venkatesh -
Error messages for indirect PO- bdc
A)
While doing bdc's for Indirect PO, I am gettingthe following error messages.
1. S06284 --> please either enter net price or refer to info record.
2. S06138 --> not possible to determine a consumption account.
3. EKI113 --> Purchasing across company codes is not allowed.
please help me out in these errors...
First time the net price field is 0. so I fixed it to 99.99. But again and again I am getiing this message
net price field is filled but why I am getting this error.
What is consumption account?
Edited by: abi baski on Feb 9, 2008 6:12 PMTry checking the message class used inside BAPI_PO_Create and all the messages in ME21n .
Then you will need to go to this message class and find out al the messages.
But this can go for a long list from 'error for valid vendor numbers, materials , and all the fields etc
Mathews -
BDC to ELM Mapping of Business Partner - Error Message Collection??
Dear Experts,
I'm working on BDC for External List Management (ELM) : CRMD_MKTLIST transaction in CRM 5.0 System with Mappping format:
<b>org_title_key; org_name1; org_name2;org_postl_cod1;org_countryiso.</b>
I want to know the where the error or any messages are collected/?? <b>tables, FM, Error logs by using BDC(Call Transaction Method)?? and How ??</b>
Can Any body help in this regard??
Regards,
ArjunCheck the following notes:-
1) Note 882726 - SAP BP: Error message R11 244 (BP Transaction + BAPIs)
2) Note 1380576 - ECC BP to CRM BP address repln fails due to validity periods
thanks
G. Lakshmipathi -
Want to output Error message in BDC recording(PA30)
Hi all,
Currently iam working on upload program,whic is done by BDC recording with transaction PA30.while loading the data to different infotypes,iam checking one condition
in particular infotype,after that i need to give the error message(Type E) and i data should not get uploaded for that infotype,and it has to go to next infotype.i want to log this error also,how can i do this?The ERROR message will stop the processing of the program, the message will need to be either an I(information) or a W(warning) message into for the program to continue processing.
Log the message by writing it to an internal table.
IF SOME_CONDITION = 'X'.
MESSAGE W001(00) with 'Hey, here is a message'.
itab-pernr = p_pernr.
itab-msgid = '00'.
itab-msgno = '001'.
append itab.
ENDIF.
CALL TRANSACTION 'PA30'........
Regards,
Rich HEilman -
Passing BAPI Error Messages to BDC Session.
Hi,
Can any one drive the idea how to convert rather passing BAPI error messages into BDC session.
regards.Naveen,
I am sure you already have the logic of "If the call transaction is errored out you create a BDC session for the same data".
Now, when your BAPI fails, irrespective of the error, you need to build the BDCDATA table and pass the data to the session. So, I don't you really need to know the errors and pass them to the BDC Session.
Check the RETURN table of the BAPI, if it has got E / A / X error types then you can build the BDCDATA table and create the session.
Regards.
Ravi
Note : Please mark the helpful answers and close the thread if the issue is resolved. -
BDC - error/success messages
Hi All,
I'm running a BDC program for PA61 but I'm getting wrong return message codes coming back after the upload. For example, if an unassigned personnel number is used a 'success' message code is sent back to my program and not an 'error' message code, as expected. Is there any way in BDC to specify a way around this issue. Thanks.
Regards,
Manu.Manu,
In general, you have to do some controls in SAP for upload data if it is possible. Let me give you an example for example we are getting a material number from file and we will use in our BDC program. So before using the material number in BDC program, we have to look at MARA (Material Master Data) table to decide it really exits in the system or not. -
BDC-Log Out from Production Server with out error message
Hi all
I have written one BDC for "FWZZ" transaction.
It is wrking fine in dev & qual.
But in prod it is logging out with out any error message.
what might be the reason??
Thaks & Regards
SwathiHi Swathi!
There is little you can do. The BDC can only be shortened by avoiding unecessary steps (each return code needs some time) - but most likely you have already a short way through the transaction.
But maybe there are some field exits / user exits / customizing settings, which start slow database actions. As long as in Dev and Qual aren't so much entries, there wasn't a problem, but now in Prod you have a performance problem.
Make a runtime analysis or a SQL-trace to see what's happening during the call transaction. This should give you an idea, where to look for the slow parts.
Regards,
Christian -
Problem in BDC: Catching error messages (Urgent)
Hello Experts,
I want to catch the error message coming in the form of popup using Call Transaction in background mode.
I have used the following statement.
CALL TRANSACTION 'FBZ5' USING bdcdata MODE 'N' messages into bdcmsg.
But this statement catches only the messages which are displayed in the task bar. It doesn't catch the error message in the form of popup.
Please suggest any solution to this.
Thanks.
RadhikaHi Radhika ,
try this one,
DATA : BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE,
BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
<b>CALL TRANSACTION 'MM01' USING BDCDATA MODE N UPDATE S MESSAGES INTO BDCMSGCOLL.</b>
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
Regards,
Vijay. -
How do i get data when displaying error message in BDC
hi,
I have generated one internal table for displaying error message using BDCMSGCOLL, i want the the error to display according to the field name,
Hw can i get it...
ex: <Material name> Error message as name already created or unit doesnt exit...
Pls reply,
Regards,
Divi.Hi Divya,
Try the below
CALL TRANSACTION 'MM01'
USING bdcdata
MODE 'N'
MESSAGES INTO MSGTAB.
IF SY-SUBRC NE 0.
move itab-matnr to jtab-matnr.
append jtab.
PERFORM CHECK.
ENDIF.
FORM CHECK.
LOOP AT MSGTAB where msgtyp = 'E'.
read table jtab index sy-index.
write:/ jtab-matnr.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
LANGUAGE = sy-langu
MSG_ID = MSGTAB-MSGID
MSG_NO = MSGTAB-MSGNR
MSG_VAR1 = MSGTAB-MSGV1(50)
MSG_VAR2 = MSGTAB-MSGV2(50)
MSG_VAR3 = MSGTAB-MSGV3(50)
MSG_VAR4 = MSGTAB-MSGV4(50)
IMPORTING
MSG_TEXT = L_MSG
EXCEPTIONS
FUNCTION_NOT_COMPLETED = 1
MESSAGE_NOT_FOUND = 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.
WRITE: L_MSG.
ENDLOOP.
ENDFORM.
- Satish -
Unable to capture error message while creating an SO using bapi
Hi,
Can anybody suggest how to capture the error message while creating a SO using BAPI.
I have developed a customeized BAPI and using the BDC format to create the SO.
Note: i am using a call transaction method for the BDC.
I am sending the message into message1.
but i am unable to send the same into an internal table
shyam.Hi Shyam
If my understanding is correct, you are performing BDC process within the customized BAPI...
And you want to collect the messages from BDC to an internal table and pass to the output.
Proceed as below:
1. While calling BDC, use CALL TRANSACTION .... with addition: <b>MESSAGES INTO itab</b>. The structure of itab should be like <b>BDCMSGCOLL</b>.
2. Now the messages will be collected in ita.
3. Prepare the messages using FM: <b>FORMAT_MESSAGE</b>
4. Collect to the returning table.
Hope this helps...
Though i could not understand the reason of creating a BDC within BAPI, you can opt for loading orders via BAPI's like: BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2.
Kind Regards
Eswar
Maybe you are looking for
-
How do I actually use home sharing between my apple computer and apple tv?
I have current updates, have set up the computer and Itunes to share the music. I have the library and get to the point where I can select a song and it shows me how long it will play with a cursor. I cannot get the cursor to start the playing. Sh
-
IMessage on a iPad one with iOS 5.1.1
My iPad iMessage has stopped working. I can't seem to sign in. Everytime I try it bounces me back to the signin window. Other devices seem to work fine. I've tried rebooting, resetting the networks, etc. Any suggestions appreciates. The password and
-
popup appears out of nowhere reading "We noticed you may have signed in or signed out in another window. Click OK to reload your page" Leads you to sign in again. This is not a problem with the old Flock, Chrome, or IE, just Firefox. It appears that
-
How to store images in the File Object????
Clearly saying i wrote a jsp program which contains an input tag as follows <form action="filename.jsp"> <input type="file" name="path"> <input type="submit" value="submit">In the above input tag i entered a file path looks like c:\Sunset.jpg .But af
-
How to see the content of an attachment in sxmb_moni
Hi all, Does someone know how to see the actual content of an attachment in sxmb_moni? If I look under Inbound Message (CENTRAL)/Payloads, I would see one node for MainDocument and another node with the name of the attachment. When I click on the att