01-10-2006 4:38 AM
Hi all,
I am running bdc in the background,and data is updated according to the file.
But problem is it shows all the warning and success messages in the spool and i dont want that messages .My output in the program come after those messages. What should i do so that i can get my proper output in the spool.
And another problem is, in my program i had a selection scrren and in that same program i want to run the bdc ,but when i run the program selection scrren for bdc also appears ,so what should i do to avoid this problem.
Thanks and Regards,
Sugeet.
01-10-2006 5:54 AM
Hi,
Call transaction.... Mode 'N' ...
will help you to get rid of this problem.
Kindly reward points if it helps.
01-10-2006 4:47 AM
Hi,
After you submit the program in background, get the spool number & display spool output as follows :-
To get the spool number use FM BP_JOB_READ. Pass jobname & jobcount & get job steplist. Read the same & get the spool number.
REFRESH : i_jobsteplist.
SET PF-STATUS 'AGENCY'.
*----
Get the Spool Number
*----
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*----
Read the Job Step list to get the spool number
*----
READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.
CHECK wa_jobsteplist-listident <> space.
*----
Spool Number
*----
l_rqident = wa_jobsteplist-listident.
*----
Check the spool in TSP01
*----
SELECT SINGLE * FROM tsp01 WHERE rqident = l_rqident.
IF sy-subrc = 0.
LEAVE TO LIST-PROCESSING.
*----
Display the Spool Content on Screen
*----
CALL FUNCTION 'RSPO_DISPLAY_SPOOLJOB'
EXPORTING
rqident = l_rqident
FIRST_LINE = 1
LAST_LINE =
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
OTHERS = 7
.
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.
Regarding the second problem, my understanding is that on the same selection screen you have parameters for one program & also parameters for BDC. And when running a program, you dont want the BDC selection screen.
In this case, first make a check box for std program & BDC. Use At Selection Screen, & check the checkbox which is selected. Accordinly hide the selection screen.
Best regards,
Prashant
01-10-2006 5:54 AM
Hi,
Call transaction.... Mode 'N' ...
will help you to get rid of this problem.
Kindly reward points if it helps.