2007 Sep 12 4:42 PM
Hi experts,
Does anibody know a function module that i caold use to release a batch imput session? And another to Process it? Like in Transaction SM35. I need this to do this in a certain case of an abap program i'm developing.
Thank-you,
Artur.
Message was edited by:
Artur Rodriguez
2007 Sep 12 4:44 PM
Did you try to SUBMIT the Report RSBDCSUB from your program?
Arya
2007 Sep 12 4:49 PM
Yes I did.
It worked in the previous version of the R/3 but we are performing an upgrade; and the same report in R/3 6.0 does not work correctly, it stays waiting and is never processed until you go to sm35, release and press it. This is why i want to add that functions to the code.
2007 Sep 12 4:51 PM
This is what i'm doing now:
SUBMIT zrsbdcsub USING SELECTION-SET varian
EXPORTING LIST TO MEMORY AND RETURN.
I don't know why I have to release and process it manually to make the BI success.
2007 Sep 12 4:54 PM
Oh!; i've just seen that the rsbdcsub the program is using is a Z one...
Maybe this is the problem. I'll try to replace it whit the standard one....
2007 Sep 12 5:32 PM
Ummmm, it does not work.
It would be ok if someone knows the function modules I'm searching.
Thank-you.
2007 Sep 12 5:38 PM
What do you mean by "it does not work?" Are you getting an error? If so, which one?
Rob
2007 Sep 12 5:54 PM
The need to <a href="http://help.sap.com/saphelp_nw70/helpdata/en/69/c2508f4ba111d189750000e8322d00/content.htm">Release</a> a session arises only when it is stuck.. ie interrupted while being processed/created. Pl verify the code that creats the session.. I don't see a need to release a session in general.
Arya
2007 Sep 13 8:49 AM
No, it's not an error. When I execute the report in the old R/3 version (4.6); the same code executes correctly; and so does the job.
But now, after the upgrade to version R/3 6.0 the job does not execute. When I go to transaction sm35 I see the job whit status "In background", and it does never finish.
Thanks,
Artur
2007 Sep 13 2:41 PM
OK, then the problem is not with RSBDCSUB; it's elsewhere. In your original code, are you closing the batch input session? If so, you might want to show this to your basis people and see if they have any ideas.
Rob
2007 Sep 12 4:48 PM
Hi,
Please try standard program RSBDCSUB.
Regards,
Ferry Lianto
2008 Jun 19 3:55 PM
*----
FORM lanzar_recuento *
*----
Función que actualiza la transaccion que le indicamos *
*
*----
FORM lanzar_recuento USING value(p_mappe) LIKE biseg-mappe.
DATA: lv_numero LIKE tbtcjob-jobcount, "ID de un job de fondo
lv_jobname LIKE tbtco-jobname, "Nombre job
lv_jobbina LIKE tbtco-jobname, "Nombre job BI
lv_status LIKE tbtcjob-status. "Satus del job
CONCATENATE 'JOB_SM35_' 'P_MAPPE' INTO lv_jobname.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_jobname "Nombre Job
IMPORTING
jobcount = lv_numero "Número Job
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
SUBMIT rsbdcsub
WITH mappe = p_mappe
AND RETURN VIA JOB lv_jobname NUMBER lv_numero.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_numero "Número job
jobname = lv_jobname "Nombre job
strtimmed = 'X' "Inicio inmediato
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
COMMIT WORK AND WAIT.
*-----Comprobamos que el job se haya ejecutado para continuar.
DO.
CALL FUNCTION 'BP_JOB_STATUS_GET'
EXPORTING
jobcount = lv_numero
jobname = lv_jobname
IMPORTING
status = lv_status
HAS_CHILD =
EXCEPTIONS
job_doesnt_exist = 1
unknown_error = 2
parent_child_inconsistency = 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.
IF lv_status NE 'F'.
WAIT UP TO 1 SECONDS.
"espere fin trabajo
ELSE.
EXIT.
ENDIF.
ENDDO.
*----Comprobamos que se haya lanzado el BI para continuar.
CLEAR lv_jobbina.
lv_jobbina = p_mappe.
DO.
CALL FUNCTION 'BP_JOB_STATUS_GET'
EXPORTING
jobcount = lv_numero
jobname = lv_jobbina
IMPORTING
status = lv_status
HAS_CHILD =
EXCEPTIONS
job_doesnt_exist = 1
unknown_error = 2
parent_child_inconsistency = 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.
IF lv_status NE 'F'.
WAIT UP TO 1 SECONDS.
"espere fin trabajo
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDFORM. "lanzar_recuento