Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to display errors

Former Member
0 Likes
523

hi,

i have done a bdc with session method, and now i want to display the errors in list. can any one help me out

manik

4 REPLIES 4
Read only

Former Member
0 Likes
442

Hello,

U can display in the list, in similar case What i have done is I placed a button for errors and displayed on the click of the button.

The code is as follows,

-


*

START-OF-SELECTION.

SET PF-STATUS 'Z08OL_WHC'.

  • Main processing logic

PERFORM AUTO_DATA.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'SAVE'.

IF G_T_FINAL[] IS INITIAL.

MESSAGE E080.

ELSE.

*Book the materials

PERFORM DATA_UPDATE.

*Auto picking

PERFORM DATA_AUTOPICK.

ENDIF.

*Display the Autopicked materials

WHEN 'AUTO'.

SET PF-STATUS 'Z08OL_WHC2' EXCLUDING 'AUTO'.

PERFORM AUTO_DISP.

*Download Autopicked materials

WHEN 'AUTOXCEL'.

IF NOT G_T_AUTO[] IS INITIAL.

PERFORM AUTO_DOWNLOAD TABLES G_T_AUTO

USING G_F_AUTOFILE.

ELSE.

MESSAGE S076.

ENDIF.

*Display Autopick error materials

WHEN 'AUTOERR'.

SET PF-STATUS 'Z08OL_WHC3'.

PERFORM AUTOERR_DISP.

*Download Autopick error materials

WHEN 'ERRXCEL'.

IF NOT G_T_AUTOERROR[] IS INITIAL.

PERFORM AUTO_DOWNLOAD TABLES G_T_AUTOERROR

USING G_F_AUTOERRFILE.

ELSE.

MESSAGE S046.

ENDIF.

*Display the error materials

WHEN 'ERRORS'.

SET PF-STATUS 'Z08OL_WHC1' EXCLUDING 'SAVE'.

PERFORM ERROR_LIST.

*Download booked materials

WHEN 'EXCEL'.

IF NOT G_T_EXCEL[] IS INITIAL.

PERFORM BOOKED_DOWNLOAD TABLES G_T_EXCEL

USING G_F_BOOKFILE.

ELSE.

MESSAGE E016.

ENDIF.

*Download error materials

WHEN 'EXCELERR'.

IF NOT G_T_ERROR[] IS INITIAL.

PERFORM ERROR_DOWNLOAD TABLES G_T_ERROR

USING G_F_BOOKERR.

ELSE.

MESSAGE E066.

ENDIF.

ENDCASE.

&----


*& Form DATA_FETCH

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM DATA_FETCH.

CLEAR: G_T_MATNR,G_T_ERS,G_T_ERROR.

REFRESH: G_T_MATNR,G_T_ERS,G_T_ERROR.

*Fetch data from master table

SELECT MATNR

Z08MM_WADC

Z08MM_RADC

FROM MARA

INTO CORRESPONDING FIELDS OF TABLE G_T_MATNR

WHERE MATNR IN S_MATNR.

IF SY-SUBRC <> 0.

MESSAGE S003.

STOP.

ENDIF.

Regards

Read only

Former Member
0 Likes
442

Hi,

You can find an error log in the same tx. SM35.

Rgrds

Read only

Former Member
0 Likes
442

Hai Manikyalarao,

In SM35, there is a option Logs in the Application Toolbar which has the logs for the processed sessions.

Read only

Former Member
0 Likes
442

hi

good

you can use the SM35 for the BDC session errors, if you run the process the the foreground than you can directly see the errors , otherwise if you run the job in background than you can see the error in the log file.

thanks

mrutyun