Submit MMBE
Hello All,
I created a program ZMMBE with the same selection-screen as of standard Program RMMMBEST (MMBE Transaction ).
Now I use a Submit statement in the ZMMBE Program as follows :
*EPORT RMMMBEST NO STANDARD PAGE HEADING MESSAGE-ID M3.
* LINE-COUNT 20 MESSAGE-ID M3.
* Anzeige der Materialbestände *
*report ZMMBE.
INCLUDE rmmmbtop.
TABLES: mbewv,mvke,mlgn,mlgt.
*INCLUDE dbmsmsel.
SELECTION-SCREEN BEGIN OF BLOCK msm WITH FRAME TITLE text-001.
SELECT-OPTIONS:
ms_matnr FOR marav-matnr MEMORY ID mat MATCHCODE OBJECT mat1,
ms_werks FOR marcv-werks MEMORY ID wrk,
ms_lgort FOR mard-lgort MEMORY ID lag,
ms_charg FOR mchb-charg MEMORY ID cha MATCHCODE OBJECT mch1.",
* MS_CHARG FOR mchb-CHARG MEMORY ID CHA,
* ch/4.6B: Wenn Bewertungsebene = Werk, dann wird BWKEY ausgeblendet
* und mit dem Inhalt von WERKS gefüllt.
* MS_BWKEY FOR MBEWV-BWKEY MEMORY ID BWK,
* MS_BWTAR FOR MBEWV-BWTAR MEMORY ID BWT,
* MS_VKORG FOR MVKE-VKORG MEMORY ID VKO,
* MS_VTWEG FOR MVKE-VTWEG MEMORY ID VTW,
* MS_LGNUM FOR MLGN-LGNUM MEMORY ID LGN,
* MS_LGTYP FOR MLGT-LGTYP MEMORY ID LGT.
SELECTION-SCREEN END OF BLOCK msm.
*--------- Design Einstiegsbild --------------------------------------*
*#JH 01.07.96 (Anfang)
*#JH Zusätzliche Kennzeichen eingeführt, um das Lesen von Sonderbest.
*#JH und offenen Beständen nur nach Bedarf durchführen zu können
*---- Teilbild "Bestandsartenselektion" -------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-087.
PARAMETERS: kzlso LIKE rmmmb-kzlso
DEFAULT 'X'.
PARAMETERS: kzlon LIKE rmmmb-kzlon
DEFAULT 'X'.
* Anmerkung: Die Kennzeichen sind standardmäßig gesetzt, um nicht bei
* bestehenden Anwendungen, die diese Parameter beim CALL TRANSACTION
* oder SUBMIT nicht versorgen, eine abweichende Anzeige gegenüber vorher
* hervorzurufen!
SELECTION-SCREEN END OF BLOCK b1.
*---- Teilbild "Listdarstellung" --------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-088.
*#JH 01.07.96 (Ende)
SELECT-OPTIONS:
* SOBKZ FOR MSKU-SOBKZ. "ch zu 3.0F
sobkz FOR rmmmb-sel_sobkz.
*ELECTION-SCREEN SKIP 1. "Entfernung war wg. GUI-Umstellung notwendig
*ARAMETERS: VERNU LIKE T136-VERNU DEFAULT DEF_VERNU OBLIGATORY,
PARAMETERS: vernu LIKE t136-vernu MEMORY ID vnr OBLIGATORY, "ch zu 3.0C
*#JH 06.08.96 P30K089911 (-> Entw.antrag 124851/1996)
* MEINH LIKE RMMME-MEINH NO-DISPLAY, "Vorl. nur Übergabeparam.
* JH/18.11.98/4.6A (Anfang)
* Feld kann nun per SET-Parameter bei Aufruf aus anderer TA belegt
* werden
* MEINH LIKE RMMME-MEINH, "Jetzt auch Eingabemöglichkeit
meinh LIKE rmmme-meinh MEMORY ID mmbe_me,
* JH/18.11.98/4.6A (Ende)
kznul LIKE rmmmb-kznul DEFAULT x,
* AS/26.01.99/4.6A (-> Entw.antrag 0002569135)
* Bei gesetztem Flag werden die Nachkommast. gemaess Cust. aufbereitet
* Anmerkung: Das Kennzeichen ist standardmäßig nicht gesetzt, um nicht
* bei bestehenden Anwendungen, die diese Parameter beim CALL TRANSACTION
* oder SUBMIT nicht versorgen, eine abweichende Anzeige gegenüber vorher
* hervorzurufen!
kzngc LIKE rmmmb-kzngc DEFAULT space.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT /1(30) text-025 FOR FIELD kzbuk.
*ELECTION-SCREEN COMMENT /1(30) TEXT-026 FOR FIELD KZWER. "s.o.
PARAMETERS: kzbuk LIKE rmmmb-kzbuk DEFAULT x,
kzwer LIKE rmmmb-kzwer DEFAULT x,
kzlgo LIKE rmmmb-kzlgo DEFAULT x,
kzcha LIKE rmmmb-kzcha DEFAULT x,
kzson LIKE rmmmb-kzson DEFAULT x.
*#JH 01.07.96 (Anfang)
SELECTION-SCREEN END OF BLOCK b2.
*#JH 01.07.96 (Ende)
* JH/3.1H/KPr1089617 (Anfang)
* Neuer dunkler Parameter, der angibt, ob der Report aus dem
* Bereichsmenü heraus gestartet wurde. SY-CALLD kann für diesen
* Zweck nur bedingt benutzt werden, weil das Kennzeichen umgesetzt
* wird, wenn sich der Report selbst aufruft.
PARAMETERS: p_mcall(1) TYPE c NO-DISPLAY.
* JH/3.1H/KPr1089617 (Ende)
*#JH 24.10.96 3.0F (-> Entw.antrag 124851/1996, IntPr 237231) (Anfang)
AT SELECTION-SCREEN ON VALUE-REQUEST FOR meinh.
*----- Eigene F4-Hilfe zur Anzeige der zu einem Material definierten
*----- Mengeneinheiten
PERFORM f4_hilfe_zul_meinh.
*#JH 24.10.96 3.0F (-> Entw.antrag 124851/1996, IntPr 237231) (Ende)
* JH/10.02.98/4.0B/KPr100038308 (Anfang)
INITIALIZATION.
* Das Lesen der Chargenebene wurde vorverlegt (s. unten)!
PERFORM chargenebene_ermitteln.
* JH/10.02.98/4.0B/KPr100038308 (Ende)
* note 548777
PERFORM restrict_select_options_matnr.
*------ Modifikation des Einstiegsbildes ------------------
AT SELECTION-SCREEN OUTPUT.
* note 548777
* LOOP AT SCREEN.
* IF SCREEN-NAME = '%_MS_MATNR-PUSH' OR
* SCREEN-NAME = '%_MS_MATNR-MORE' OR
* SCREEN-NAME = 'MS_MATNR-HIGH' OR "CH/07.02.1995
* SCREEN-NAME = '%_MS_MATNR_%_APP_%-VALU_PUSH'. "CH/14.03.1995
* SCREEN-ACTIVE = '0'.
* MODIFY SCREEN.
* ENDIF.
* ENDLOOP.
* Evtl wird vom aufrufenden Programm eine Anzeigeversion mitgegeben
* IF NOT SY-CALLD IS INITIAL. "ch zu 3.0C
IF vernu IS INITIAL. "note 428395
GET PARAMETER ID vnr FIELD vernu.
ENDIF. "note 428395
* SET PARAMETER ID VNR FIELD DEF_VERNU. "ch zu 3.0C
* ENDIF. "ch zu 3.0C
SELECT * FROM t136 WHERE vernu = vernu. "note 486104
EXIT.
ENDSELECT.
IF sy-subrc NE 0. "note 486104
* if vernu is initial. "kann passieren nach 'Neue Selektion'
vernu = def_vernu.
ENDIF.
IF meinh IS INITIAL. "note 428395
GET PARAMETER ID 'MMBE_ME' FIELD meinh. "JH/18.11.98/4.6A
ENDIF. "note 428395
* note 610162
CLEAR ms_matnr.
READ TABLE ms_matnr.
IF sy-subrc NE 0.
GET PARAMETER ID 'MAT' FIELD ms_matnr-low.
REFRESH ms_matnr.
MOVE 'I' TO ms_matnr-sign.
MOVE 'EQ' TO ms_matnr-option.
APPEND ms_matnr.
ENDIF.
*----- Prüfen der Eingaben ----------------------------------------
AT SELECTION-SCREEN.
*---- Prüfen der Anzeigeversion --------------------------------------
SELECT * FROM t001w WHERE werks IN ms_werks. "ch zu 3.0D
EXIT. "
ENDSELECT. "
IF sy-subrc > 0. "->KPr 30121
MESSAGE e102 WITH ms_werks-low. "
ENDIF. "
SELECT * FROM t136
WHERE vernu = vernu.
EXIT.
ENDSELECT.
IF sy-subrc NE 0.
table = 'T136 '.
SET PARAMETER ID 'TAB' FIELD table.
MESSAGE e404 WITH vernu.
ELSE.
rmmmb-vernu = t136-vernu.
ENDIF.
* --- Ermitteln KZ_NUR_WERKSOND ---------------------------------------
PERFORM sobkz_einlesen.
* --- Selektionsebenen auswerten --------------------------------------
PERFORM selektionsebenen.
*// JH 11.09.96 KPr1192975
* --- SPA/GPA für Lagerort und Charge übernehmen bei Aufruf aus -
* --- anderer Anwendung
* IF NOT SY-CALLD IS INITIAL.
* PERFORM GPA_LGORT_CHARGE.
* ENDIF.
IF sscrfields-ucomm EQ 'ONLI' OR "SW/8.10.98
sscrfields-ucomm EQ 'PRIN'.
PERFORM read_kzwso. "ALRK014884 SW
IF NOT kzwso IS INITIAL. "Begin P40K053180 SW
IF NOT ms_charg[] IS INITIAL.
ms_charg_save[] = ms_charg[].
CLEAR ms_charg.
REFRESH ms_charg[].
ENDIF.
IF NOT ms_werks[] IS INITIAL.
ms_werks_save[] = ms_werks[].
* CLEAR MS_WERKS. "note_737504
* REFRESH MS_WERKS.
ENDIF.
IF NOT ms_lgort[] IS INITIAL.
ms_lgort_save[] = ms_lgort[].
* CLEAR MS_LGORT. "note_737504
* REFRESH MS_LGORT.
ENDIF.
ENDIF. "End P40K053180 SW
ENDIF.
START-OF-SELECTION.
SUBMIT rmmmbest AND RETURN "via selection-screen
WITH ms_matnr IN ms_matnr
WITH ms_werks IN ms_werks
WITH ms_lgort IN ms_lgort
WITH ms_charg IN ms_charg
WITH kzlso EQ kzlso
WITH kzlon EQ kzlon
WITH sobkz EQ sobkz
WITH vernu EQ vernu
WITH meinh EQ meinh
WITH kznul EQ kznul
WITH kzngc EQ kzngc
WITH kzbuk EQ kzbuk
WITH kzwer EQ kzwer
WITH kzlgo EQ kzlgo
WITH kzcha EQ kzcha
WITH kzson EQ kzson.
END-OF-SELECTION.
* Formroutinen für die Listerstellung
*eject
INCLUDE rmmmbefg . "Allgemeine Form-Routinen
*eject
INCLUDE rmmmbefa . "Spez. Routinen für Grund- und Aufrißliste
*eject
INCLUDE rmmmbefe . "Spez. Routinen für Einzelliste
*eject
INCLUDE rmmmbefl . "Verschieben der Grundliste
*eject
INCLUDE rmmmbefm . "Lesen und merken der Bestandsdaten
*eject
INCLUDE rmmmbeff . "FCode-Handling
*eject
INCLUDE rmmmbmur . "Mengenumrechnung auf Charge "ALRK014884 SW
*eject
INCLUDE rmmmpbo1 . "PBO-Module
*eject
INCLUDE menuretn. "Standardroutine zum Beenden"SW/8.10.98
Everything is ok . But when I execute this Program by entering some input values to the SSCRN the result comes.
Now when I use the back button the control is going to the selection-screen of the called program ( i.e sscrn of the standard transaction ZMMBE ) and when I press BACK again then the control is coming to the SSCRN of ZMMBE program.
I want the control to be back on the SSCRN of ZMMBE program for the first time only.
How should I acheive this ?
Regards,
Deepu.K
Hi,
this happens because the fcode handles from the standard program. You can find the code in include rmmmbeff. As you can see when you press 'Back' button the program submits again the standard mmbe report.
As a workaround you can try this
data: lt_ABAPLIST like ABAPLIST occurs 0 with header line.
SUBMIT rmmmbest exporting list to memory "via selection-screen
WITH ms_matnr IN ms_matnr
WITH ms_werks IN ms_werks
WITH ms_lgort IN ms_lgort
WITH ms_charg IN ms_charg
WITH kzlso EQ kzlso
WITH kzlon EQ kzlon
WITH sobkz EQ sobkz
WITH vernu EQ vernu
WITH meinh EQ meinh
WITH kznul EQ kznul
WITH kzngc EQ kzngc
WITH kzbuk EQ kzbuk
WITH kzwer EQ kzwer
WITH kzlgo EQ kzlgo
WITH kzcha EQ kzcha
WITH kzson EQ kzson
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LT_ABAPLIST
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'DISPLAY_LIST'
EXPORTING
FULLSCREEN = 'X'
CALLER_HANDLES_EVENTS =
STARTING_X = 10
STARTING_Y = 10
ENDING_X = 60
ENDING_Y = 20
IMPORTING
USER_COMMAND =
TABLES
LISTOBJECT = LT_ABAPLIST
EXCEPTIONS
OTHERS = 1
hope this helps.
Kostas
Similar Messages
-
Getting Values of MMBE transaction
Hello all,
I need to get the Values of the MMBE transaction and use those values in my report for calculation. Can anybody suggest a way to execute the MMBE tranasaction from my report and get the values in a table.
Regards,
VijayakumarVijay,
Submit MMBE program in your zprogram by passing the values to the MMBE selection screen for ex
SUBMIT MMBE Program WITH p_werks = p_werks
EXPORTING LIST TO MEMORY AND RETURN.
and then use
LIST_FROM_MEMORY
LIST_TO_ASCI
LIST_FREE_MEMORY
Or copy MMBE program as zmmbe and then use EXPORT IMPORT concept to get the final internal table values into your zprogram.
K.Kiran. -
Hello Experts,
A big Hi to u all.
The problem that I am currently facing is that I cannot set a batch in the Purchase Order Creation(ME21N). Moreover, I would love to know what is the table where the Job number is loaded the moment it is created. Is there any table where the Job Number is a primary key?
How do we display any specific details in the Transaction MMBE?
Kindly help.
I would really appreciate.
Thanks in advance!
Warm regards,
Amrita Mitra.Hi..
Check out the Code below to find the details of JOB in a program
Check the Code below.
The statements related to SPOOL Number are in BOLD
*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
<b>SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.</b> MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
<b>CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.</b>
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM. -
Trying to Submit an App to Vendor Portal. Can't get it to work.
HI,
I've spent about 14 hours trying to submit an App to the Vendor portal. Running FIrefox 3.0.19 on Windows XP, SP3. Seems the push-buttons and forms just won't work. I've updated to the latest JRE 6.0.250.10 runtime, and still no luck.
Several folks reported this issue back in 2011 on other developer forums. Solution then was to use latest IE9,
with the upgrade to latest Java Runtime 6. Is IE9 the only browser Vendor Portal works with?
FOr example, I can log into the Vendor Portal (ver. 4.0.1.3, i think, as of now, 24Sept2012), and update fields such as address, name, etc. But if I try to upload a 480x480 logo, it just keeps reporting "Invalid logo file" (or whatever the red error message is). And, when I press the button to do the "Add Rating" on the app description screen, I get
all the radio buttons, but when I click submit, the form disappears, (without indicating any update - ie no green
"G" for General Audience). Attempts to press "Next" to get to next page, report that "Rating has not been added"
and must be added.
SO, I am stymied. I even tried the browser on the PLaybook, and even it will not allow a 480x480 logo file to be
uploaded successfully.
Is the Vendor Portal disabled? My Firefox+WinXP(sp3) platform is used to connect to numerous secure
sites, and has all the features enabled to allow secure uploads, and Java/Javascript operation.
This is a remarkably difficult process. Any suggestions? Is there a Linux flavour combo that might work, or is
the Vendor Portal not online right now, for app submission? Thanx for any info...
- RusMore details: Trying to add a logo picture, using Vendor Portal website version 4.0.3.1. I have confirmed,, using three different graphics packages, that my logo picture is 480x480 pixels. Latest attempt is using Firefoix 13.0.1, from a MacBook Air! (Bought in June 2012, latest Firefox.. all new code, latests JRE, etc. This platform works everywhere folks... ) Attempts to load a logo .jpg file fail, with a message "Please Select valid logo".
This is the Vendor Portal for adding Playbook Apps, and managing Vendor accounts. Pretty important thingy, no?
Website URL is: https://appworld.blackberry.com/isvportal
Been trying for two days to add a logo-picture, and the details of a completed app. Anyone minding the store on this?? Anyone got any suggestions? If I can determine what the problem is, I will post my solution here. It occurs to me that this must be possible, somehow, no?
- Rus -
How to submit a concurrent request from Discoverer report.
I would like to know If any one has tried submitting a concurrent request from Discoverer Report?_
This is no stupid question, but our team here finally decided with a solution to our long pending issues with few of the discoverer report. To Proceed further, we would like to know, how to submit a concurrent request from Discoverer report?
We are looking for calling a package from the Disco admin by passing the parameters from the disco to the 6i report.
All help us in this regards are much appreciated.
Kindly help us in the same!
Thanks
ArunThanks Rod for confirming the same.
I will be trying the same today and will let you know if I succeed in doing it.
If I can share the actual requirement with you, it goes like this.
"I will be triggering the Oracle 6i standard AP Trail balance report through the Disco report. The standard report will be inserting the required data to one of my custom table. Once the concurrent program completes normal, my custom table will be having the required data to create the workbook specific to the current run of the concurrent program.
The one problem which I think could happen is, How can I make my disco report to wait till the standard program to complete in normal so that my disco report can be generated with the data from custom table.
Will the above requirement is possible If I follow the way you mention in the PDF or Could you suggest a better way for achieving the same.
In short, my requirement is: The custom table(say XX_TABLE) will be populated with data when the standard 6i report is run and the disco admin will be making of the custom table (XX_TABLE) to generate the report.
Please advice.
Thanks
Arun -
Direct Print smartform to printer via JOB_OPEN function and using SUBMIT
Hello,
I can not able to printout from forms . I can able to get spool number but it is not printing directly to printer (printer Output should come automatic). I am getting error message in SP02 as Status ->Waiting when i check is showing as "Frontend unavailable".
please find sample code below to test same:
REPORT ZTEST_1 .
constants : wc_x type c value 'X'.
DATA: wv_val(1) TYPE c,
wv_pripar TYPE pri_params,
wv_arcpar TYPE arc_params,
wv_lay TYPE pri_params-paart value 'DINA4',
wv_lines TYPE pri_params-linct,
wv_rows TYPE pri_params-linsz.
data: wv_jobname like tbtcjob-jobname.
data: wv_jobcount like tbtcjob-jobcount,
wv_host like msxxlist-host.
data: begin of ws_starttime.
include structure tbtcstrt.
data: end of ws_starttime.
data: wv_starttimeimmediate like btch0000-char1 value 'X',
wv_flag(1),
WV_DO_PRINT type i.
concatenate sy-tcode+0(4) ' ' 'sample test - print'
into wv_jobname.
*Job open
call function 'JOB_OPEN'
exporting
delanfrep = 'X'
jobname = wv_jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = wv_jobcount
if sy-subrc eq 0.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = wv_arcpar
in_parameters = wv_pripar
LIST_NAME = 'JOB NAME'
LIST_TEXT = 'test_text'
RECEIVER = sy-uname
IMMEDIATELY = wc_x
RELEASE = wc_x
USER = sy-uname
layout = wv_lay
no_dialog = wc_x
IMPORTING
out_archive_parameters = wv_arcpar
out_parameters = wv_pripar
valid = wv_val
break-point.
wv_pripar-PRSAP = space.
wv_pripar-PRIOT = 1.
wv_pripar-prrec = sy-uname.
if not wv_val is initial.
*call external program and pass data
submit SF_EXAMPLE_01
USER sy-uname
via job wv_jobname
number wv_jobcount
TO SAP-SPOOL
SPOOL PARAMETERS wv_pripar
ARCHIVE PARAMETERS wv_arcpar
WITHOUT SPOOL DYNPRO
AND RETURN.
endif.
*Close job
ws_starttime-sdlstrtdt = sy-datum .
ws_starttime-sdlstrttm = sy-UZEIT.
ws_starttime-IMSTRTPOS = WC_X .
call function 'JOB_CLOSE'
exporting
event_id = ws_starttime-eventid
event_param = ws_starttime-eventparm
EVENT_PERIODIC = space
jobcount = wv_jobcount
jobname = wv_jobname
laststrtdt = ws_starttime-laststrtdt
laststrttm = ws_starttime-laststrttm
prddays = 0 "set to 0 not repeat
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = ws_starttime-sdlstrtdt
sdlstrttm = ws_starttime-sdlstrttm
strtimmed = wv_starttimeimmediate
endif.Hi,
As far as printing to devices not all devices support Bluetooth. Many devices support Bonjour protocal, IPP. The main print port is 9100. Additionally you can see what IO protocols are supported on a product by looking at the EWS (Embedded WebServer) there should be a networking page with that information. Port 9100 is your basic print port and different devices will support different formats (PDF, JPEG, PCL5, PCL6). If there is an API you can find (i am not familiar with J2ME availible calls, then you can use those and send the data to port 9100. Again that is the basic path most printers will accept. not all devices support bonjour not all device support bluetooth etc... Hope that helps and good luck.
I am an HP Employee. -
Open BI Publisher Report After Submit
I have a page with 2 date fields, which are parameters for a report.
I also have a button called RUN_REPORT.
What I need to do is that the user puts the parameters in, then clicks RUN_REPORT. The page should submit (putting parameters into session state) and then a BI Publisher report should appear in a pop up page.
At the moment using the code below, the user inputs parameters and clicks RUN-REPORT (SUBMIT). Unfortunatley the BI report tries to open before the submit is finished. So there are no items in session state for the report to use as parameters.
Page HTML Header
<script type="text/javascript">
function renew()
doSubmit('SUBMIT')
popupURL('This contains my string to open the report')
</script>On my button
javascript:renew();Help appreciated
GusI've solved this in two ways:
First solution:
- The last parameter the user has to pick is in a selectlist which submits the page
- The button redirects to url:
javascript:popUpNamed('URL','');Seccond solution (and user-friendlier solution ;) ):
1 - Hidden item (say P_RAP), default it's empty
2 - The buttons Action is 'Submit page'
3 - A conditional Branche to the own page, which only runs when the report button is pressed.
3a -- This branche sets the hidden Item (P_RAP) with the report name (in my case, becouse I can start multiple reports on the page and I use it in my URL to the report, it can also be just a 1 or something, just that it is filled)
4 - A Page Process which runs On Load - After Header, and is conditional: Value of Item P_RAP is NOT NULL.
4a -- The code of this process is:
BEGIN
htp.p('<script type="text/javascript">');
htp.p('w = open("URL_to_the_report","_blank","Scrollbars=0,location=0,resizable=1,menubar=0,toolbar=0,left=50,top=100,width=500,height=500");');
htp.p('</script>');
:P_RAP:=''; /*clear the P_RAP item after starting the report*/
END;Hope this helps -
Question
I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
'''(in English)'''Hi Danny,
Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
but not 180, right?
I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
=COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
or
=SUM(IIF(Fields!TICKET_STATUS=4,1,0))
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?
Welcome to the Apple community.
Does anyone have suggestions?
Trash the spyware (Chrome) and use Safari. -
This started yesterday night. I tried to restore firefox to yesterday morning's time machine version, but no dice. No idea what's causing it, I haven't installed anything.
The refusing to submit my crash reports really confuses. I don't know if it's applicable to everything or just browsers - browsers are the only thing that have crashed.
Thanks for the help!The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
To Reset Firefox do the following:
#Go to Firefox > Help > Troubleshooting Information.
#Click the "Reset Firefox" button.
#Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
#Firefox will open with all factory defaults applied.
Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
Did this fix your problems? Please report back to us! -
Schedule jobs witj job open, submit and close
Hi gurus,
I need to know if there is any way to schedule various jobs using the FM job_open job_submit and job_close. Like schedule the first job for a date and a hour and schedule others jobs to run after the first job sequential.
Its this possible?
Thk in advanceHi
see the sample code for the Job scheduling using the fun modules
IF p_bjob = 'X'.
CONCATENATE sy-cprog sy-datum sy-uzeit
INTO jobname SEPARATED BY '_'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING
out_archive_parameters = arc_params
out_parameters = print_params
valid = valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF valid = chk.
SUBMIT yREP WITH s_kunnr IN s_cust
AND RETURN
USER sy-uname
VIA JOB jobname
NUMBER jobcount
TO SAP-SPOOL
SPOOL PARAMETERS print_params
ARCHIVE PARAMETERS arc_params
WITHOUT SPOOL DYNPRO.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount
jobname = jobname
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE i029 WITH jobname.
ENDIF.
ELSE.
MESSAGE s000 WITH text-003.
STOP.
ENDIF.
ENDIF.
Regards
anji -
Problems creating background job for program (job open, submit and close)
Hi gurus,
im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
Below goes my code,
any ideas will be rewarded
CLEAR: stdt_modify_type, stdt_output.
CALL FUNCTION 'BP_START_DATE_EDITOR'
EXPORTING
stdt_dialog = 'Y'
stdt_input = stdt_input
stdt_opcode = 14
IMPORTING
stdt_modify_type = stdt_modify_type
stdt_output = stdt_output
EXCEPTIONS
fcal_id_not_defined = 1
incomplete_last_startdate = 2
incomplete_startdate = 3
invalid_dialog_type = 4
invalid_eventid = 5
invalid_opcode = 6
invalid_opmode_name = 7
invalid_periodbehaviour = 8
invalid_predecessor_jobname = 9
last_startdate_in_the_past = 10
no_period_data_given = 11
no_startdate_given = 12
period_and_predjob_no_way = 13
period_too_small_for_limit = 14
predecessor_jobname_not_unique = 15
startdate_interval_too_large = 16
startdate_in_the_past = 17
startdate_is_a_holiday = 18
startdate_out_of_fcal_range = 19
stdt_before_holiday_in_past = 20
unknown_fcal_error_occured = 21
no_workday_nr_given = 22
invalid_workday_countdir = 23
invalid_workday_nr = 24
notbefore_stdt_missing = 25
workday_starttime_missing = 26
no_eventid_given = 27
OTHERS = 28.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MOVE 'X' TO gv_flag.
ENDIF.
DATA jobname LIKE tbtcjob-jobname.
DATA jobcount LIKE tbtcjob-jobcount.
DATA job_release LIKE btch0000-char1.
DATA job_imediate TYPE c.
CLEAR: jobname, jobcount, job_release.
CONCATENATE 'MAPAEXEC' sy-uname sy-datum
INTO jobname SEPARATED BY space.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ENDIF.
SUBMIT z_mapa_execucao_orcamental
VIA JOB jobname NUMBER jobcount
WITH ano EQ ano
WITH so_perio IN so_perio
WITH so_date IN so_date
WITH so_org EQ so_org
WITH so_num IN so_num
AND RETURN.
IF stdt_output-startdttyp EQ 'I'.
CLEAR job_imediate.
job_imediate = 'X'.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
calendar_id = stdt_output-calendarid
event_id = stdt_output-eventid
event_param = stdt_output-eventparm
event_periodic = stdt_output-periodic "?
jobcount = jobcount
jobname = jobname
laststrtdt = stdt_output-laststrtdt
laststrttm = stdt_output-laststrttm
prddays = stdt_output-prddays "??
prdhours = stdt_output-prdhours "?
prdmins = stdt_output-prdmins "??
prdmonths = stdt_output-prdmonths
prdweeks = stdt_output-prdweeks "?
predjob_checkstat = stdt_output-checkstat
pred_jobcount = stdt_output-predjobcnt
pred_jobname = stdt_output-predjob
sdlstrtdt = stdt_output-sdlstrtdt
sdlstrttm = stdt_output-sdlstrttm
strtimmed = job_imediate
targetsystem = stdt_output-instname
start_on_workday_not_before = stdt_output-notbefore
start_on_workday_nr = stdt_output-wdayno
workday_count_direction = stdt_output-wdaycdir
IMPORTING
job_was_released = job_release
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.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ELSE.
MESSAGE i004(zmapas) WITH jobname.
ENDIF.
Thanks in advance,
Best Regards
João MartinsHello João.
In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
Check this code:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobname
IMPORTING
jobcount = w_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
CHECK sy-subrc = 0.
CLEAR seltab_wa.
MOVE: t_jobs-param TO seltab_wa-selname,
t_processar-line+34 TO seltab_wa-low.
APPEND seltab_wa TO seltab.
seltab_wa-selname = 'P_LOJA'.
seltab_wa-low = t_processar-ficheiro+7(4).
APPEND seltab_wa TO seltab.
*** Submete o programa para o JOB
SUBMIT (t_jobs-repid)
WITH SELECTION-TABLE seltab
USER sy-uname
VIA JOB w_jobname NUMBER w_jobcount
AND RETURN.
*** Encerra o JOB
l_hora = sy-uzeit.
ADD 60 TO l_hora.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobcount
jobname = w_jobname
sdlstrtdt = sy-datum
sdlstrttm = l_hora
targetserver = w_servidor
IMPORTING
job_was_released = l_liberado
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.
Regards.
Valter Oliveira. -
hi All,
I have a Z Function Module(RFC enabled) which passes the Program name its variant and the Destination.
Inside this FM it call the JOB_OPEN Submit and JOB_CLOSE FM to trigger the report of different system.
i mean if i m in sytem ABC and i want to execute a report on Sytsem on System XYZ then this FM works fine. Its is created by me and working fine sice last 3-4 year.
Now i ahve a reqirement to delete this FM if there is any SAP Standard functinality exist in ECC 6.0 which
can trigger the report at different destination.
Que-My question is How to trigger a report at different destination .I need SAP Standard functinality of ECC6.0. please help me.
Thanks in Advance
regards,
Saurabh TThis will give you an idea of how it works. Save the file and double click on it to open in IE.
<html>
<head></head>
<body>
<form name="myForm" method="GET" action="servlet/InsertRecords">
<P>
<INPUT TYPE="RADIO" NAME="Radio1" VALUE="1" onClick="onClickFunction(1)" >Insert Record
<BR>
<INPUT TYPE="RADIO" NAME="Radio1" VALUE="2" onClick="onClickFunction(2)" >Delete Record
<BR>
</P>
</form>
</body>
<Script Language="JavaScript">
function onClickFunction(inVar) {
if (inVar == 1) { document.myForm.action="servlet/InsertRecords";
document.myForm.submit(); }
if (inVar == 2) { document.myForm.action="servlet/DeleteRecords";
document.myForm.submit(); }
</script>
</html> -
Is there any program to submit in background, ALV report?
I tried in job_open and job_close, but nto worked out.Hi,
You need to use the following function modules:
- JOB_CREATE - create the job
- JOB_SUBMIT - add a step in the job
- JOB_CLOSE - to pass the job to the background processing subsystem
Alternatively, you can use SUBMIT... VIA JOB, which is easier but gives you less control.
MJ -
Submit report background ------ problem
Hi Friends,
This is regarding submit program in background.
I am calling program like this..
SUBMIT ZXXXX
VIA JOB name NUMBER number
WITH P_MODE EQ 'N'
TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
AND RETURN.
With this Job is creating successfully and status showing finished. But it seems program was not executed. no action has performed. time taken is 0 seconds
the same code I tested in debug mode by commenting
* VIA JOB name NUMBER number
in the above statement.
it is working fine. could you pls help me I want submit my program in background.
for your information. Before submit I am using function module JOB_OPEN.
and after submit I am using JOB_CLOSE.
Pls help me. very urgent.
Thanks in advance.
RaghunathYou can check the job status in SM37. Here is a working example, see what's different in your code:
CONCATENATE 'Z' p_vkorg '_POST_RETURNS' INTO jobname.
CLEAR jobcount.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount.
IF sy-subrc <> 0.
ENDIF.
SUBMIT ...
WITH p...
VIA JOB jobname
NUMBER jobcount
USER user_name
AND RETURN.
* Close the job and run immediately
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount
jobname = jobname
strtimmed = 'X'. " Start immediately
Maybe you are looking for
-
Help with Photoshop Elements 9 Organizer
I need some help with my new Photoshop Elements 9 Organizer. I have not had previous versions of Photoshop, this was a brand new installation. I had previously used Kodak software which came with my camera to organize and edit pictures. My PC is app
-
I was going nuts with trying to install RH6.1 with O81701 (R3) the first time around since I would get some really wacky Java errors. Then I downloaded the linux817.tar tarball again and put it on CD, burned it and untarred it under my linux partitio
-
I'm looking for a JDBC driver (for both Win2k and Solaris) which can be used to connect to an Oracle 7.34 database. Does anybody know where I can download one for free? I have tried the Oracle website, but there are only drivers for Oracle 8 and 9 av
-
Time lapse photography on the cheap.
Needed to do some quick and dirty time lapse shots over the weekend. Automator has a Take Picture action but not all cameras are supported (for some strange reason) and even though I can tether shoot in Aperture my Canon 40D isn't supported by Automa
-
Upgrade has clobbered bookmarks
All was going well with Firefox 11 this morning until it installed an automatic upgrade. Now all bookmarks have been lost. I tried restoring from a previous date. Nada! History is lost as well. I uninstalled and reinstalled Firefox. This did nothing.