‎2008 Aug 29 6:32 AM
Hi Friends,
Exception condition 'Unkonwon_Error' raised wile uploading BRS thru BDC program.
Pls find below the detail runtime error documentation and my BDC std coding declaration.
**************Runtime Error
Error Analysis:
A RAISE statement in the program "SAPLGRAP" raised the exception condition "UNKNOWN_ERROR".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
Trigger Location of Runtime Error
Program SAPLGRAP
Include LGRAPF02
Row 264
Module type (FORM)
Module Name DOWNLOADWRAP
<251| IF sy-subrc <> 0.
252| CASE sy-subrc.
253| WHEN 1.
254| RAISE FILE_WRITE_ERROR.
255| WHEN 2.
256| RAISE NO_BATCH.
257| WHEN 3.
258| RAISE GUI_REFUSE_FILETRANSFER.
259| WHEN 4.
260| RAISE INVALID_TYPE.
261| WHEN 5.
262| RAISE NO_AUTHORITY.
263| WHEN OTHERS.
|>>>>>| RAISE UNKNOWN_ERROR.
| 265| ENDCASE.
| 266| ENDIF.
267 |
| 268| P_FILELENGTH = P_FILELENGTH + FileLength. >
*********************BDC declaration
FORM BDC_TRANSACTION USING TCODE.
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
REFRESH MESSTAB.
CALL TRANSACTION TCODE USING BDCDATA
MODE 'A'
UPDATE 'A'
MESSAGES INTO MESSTAB.
L_SUBRC = SY-SUBRC.
LOOP AT MESSTAB.
SELECT SINGLE * FROM T100 WHERE SPRSL = 'EN'
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
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.
WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
MOVE MESSTAB-MSGTYP TO EIT-MSGTYP.
MOVE L_MSTRING(250) TO EIT-EL_MSTRING(250).
APPEND EIT.
ELSE.
WRITE: / MESSTAB.
MOVE-CORRESPONDING MESSTAB TO EIT.
APPEND EIT.
ENDIF.
ENDLOOP.
SKIP.
DATA OPF like RLGRAP-FILENAME. "(31).
CONCATENATE '''' 'C:\' SY-DATUM '_' SY-UZEIT '_' 'BDCLOG.TXT' '''' INTO
OPF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = OPF
FILETYPE = 'DAT'
TABLES
DATA_TAB = EIT.
REFRESH BDCDATA.
ENDFORM.
**************Soubroutine
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
endform.
********************
Pls advise, how to relsove this and where the rumtime error occurs.
thanks & regards
Sankar.
‎2008 Aug 29 6:34 AM
Whatever you are calling before line 251 is giving a return code other than zero.
‎2008 Aug 29 7:04 AM
Hi Rainer,
Im not clear in this, could u pls help me more elaborately?
thanks & regards
sankar.
Edited by: sankar babu on Aug 29, 2008 8:44 AM
‎2008 Aug 29 7:48 AM
Hi sankar babu,
Program SAPLGRAP
Include LGRAPF02
Function Module : GUI_DOWNLOAD
after callin the above FM the Sy-subrc is comming 22...
and that's why u r getting this error...
check out in Debugging mode... Why it's giving the value 22...
Most probably there might be DATA problem...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
‎2008 Aug 29 8:18 AM
hi Sanker,
Use Exception with the FM 'WS_DOWNLOAD'
I am sure your dump will be resolved..
I mean call FM through Pattern button it will write Exceptions also with import and export...
So uncomment all the exceptions..
Regards,
Meet
‎2008 Sep 06 6:52 AM