'BAPI_DOCUMENT_CREATE2' in background
I am trying to call 'BAPI_DOCUMENT_CREATE2' in background mode. I need to check in documents from application server, but I am getting "File cannot be opened" error.
I am populating the following fields
bapi_doc_files2-FILE_ID
bapi_doc_files2-wsapplication
bapi_doc_files2-storagecategory
bapi_doc_files2-checkedin
bapi_doc_files2-active_version
bapi_doc_files2-description
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = pa_doc_data
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
IMPORTING
documenttype = l_documenttype
documentnumber = l_documentnumber
documentpart = l_documentpart
documentversion = l_documentversion
return = la_return
TABLES
characteristicvalues = pt_characteristicvalues
documentfiles = pt_documentfiles.
What should I consider if I wanted to call this bapi in background?
Hai..
These are the some some links
Running a BAPI in background..
BAPI in Background..Urgent Pls
BAPI in background processing
BAPI in Background mode
hope this may help you.
KHS
Similar Messages
-
Problem in executing BAPI_DOCUMENT_CREATE2 in background
Hello SAP Gurus,
My requirement is to upload documents from application server(AL11) / presentation server (PC) to DMS.
For the above requirement I'am using BAPI "BAPI_DOCUMENT_CREATE2".
When i execute the program in foreground i have no issues , but when executing in background getting error :
"Error in checkin & storing file "...
Regards,
Madan Shetty.Hi Madan,
Also Add the the BAPI_DOCUMENT_CREATE2 parameter PF_HTTP_DEST with value SAPHTTPA. Make sure that one is also on sm59. Plus check the server where files are has been created as SAP app server on AL11
Hope this helps.
Regards,
Deepak Kori -
BAPI_DOCUMENT_CHANGE2 and BAPI_DOCUMENT_CREATE2 in background
Hi,
Can anyone please tell me whether the BAPIS 'BAPI_DOCUMENT_CHANGE2 ' and 'BAPI_DOCUMENT_CREATE2 can be executed in background?.
In foreground mode I can able to create and change the document successfully.
but in background mode I am getting an error from the BAPI saying that document can not be checked in.
Can anyone help me?
Regards,
DeepuHi,
maybe the problem are not the BAPI but the selection of the file. You can't use the GUI Frontend Services for selection in Batch-Mode..
Please use FUNCTION 'EPS_GET_DIRECTORY_LISTING' .
program-code example for background:
FORM pd_batch .
DATA: lv_def(5) TYPE c,
lv_hp1 TYPE string,
lv_hp2 TYPE string,
lv_hp3 TYPE string,
lv_sep3(1),
lv_vg(20) TYPE c,
lt_epsfili TYPE STANDARD TABLE OF epsfili,
ls_epsfili TYPE epsfili.
DATA: lv_start TYPE string.
DATA: lv_dir TYPE epsf-epsdirnam.
DATA: lv_filter TYPE string.
DATA: gt_filetable TYPE filetable.
DATA: wa_filetable LIKE LINE OF gt_filetable.
DATA: return TYPE i.
DATA: lv_objnr TYPE cobrb-objnr.
DATA: lt_jstat LIKE STANDARD TABLE OF jstat WITH HEADER LINE.
DATA: lv_epsfilnam TYPE epsf-epsfilnam.
REFRESH: lt_files,lt_drat,lt_drad.
SELECT * FROM zqm_pd_custom INTO wa_pd_custom WHERE manuell = ''.
APPEND wa_pd_custom TO gt_pd_custom.
ENDSELECT.
Dokumentendaten zuweisen
break de00009.
LOOP AT gt_pd_custom INTO wa_pd_custom.
Liste mit allen Einlesedaten aus dem Verzeichnis
REFRESH: gt_filetable, lt_files.
CLEAR: wa_filetable.
CLEAR: ls_doc,ls_return,ls_return2, lf_docnumber,
lf_docpart,lv_01,lv_02,lv_03,lv_path,lv_file,
lv_file2,lv_fauf, lv_rest,lv_help,lv_help2,lv_sep,wa_aufk.
ls_doc-documenttype = '044'.
ls_doc-documentversion = '00'.
ls_doc-documentpart = '000'.
ls_doc-statusextern = 'FR'.
lv_sep3 = '-'.
lv_start = wa_pd_custom-path.
CONCATENATE '.' wa_pd_custom-ufext INTO lv_filter.
GUI-Frontend-Services läuft nicht im Batch
IF sy-batch = 'X'.
lv_dir = lv_start.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = lv_dir
file_mask = '.'
TABLES
dir_list = lt_epsfili
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
LOOP AT lt_epsfili INTO ls_epsfili.
wa_filetable-filename = ls_epsfili-name.
APPEND wa_filetable TO gt_filetable.
ENDLOOP.
ELSE.
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = lv_start
filter = lv_filter
files_only = 'X'
CHANGING
file_table = gt_filetable
count = return
EXCEPTIONS
cntl_error = 1
directory_list_files_failed = 2
wrong_parameter = 3
error_no_gui = 4
not_supported_by_gui = 5
OTHERS = 6.
ENDIF.
IF sy-subrc = 0 AND gt_filetable IS NOT INITIAL..
LOOP AT gt_filetable INTO wa_filetable.
REFRESH lt_files.
lv_path = wa_pd_custom-path.
lv_file = wa_filetable-filename.
SPLIT lv_file AT lv_sep3 INTO: lv_hp1 lv_hp2.
lv_fauf = lv_hp1.
CONCATENATE '00000' lv_fauf INTO lv_fauf.
REPLACE ALL OCCURRENCES OF '.csv' IN lv_hp2 WITH ''.
CONCATENATE 'O0000000000' lv_hp2 INTO lv_vg.
Testen, ob FAUF vorhanden
SELECT SINGLE * FROM aufk INTO wa_aufk
WHERE aufnr = lv_fauf.
IF sy-subrc <> 0.
*Datei einfach stehen lassen
ELSE.
Nur Status "TABG" behandeln
CONCATENATE 'OR' lv_fauf INTO lv_objnr.
CALL FUNCTION 'STATUS_READ'
EXPORTING
objnr = lv_objnr
only_active = 'X'
TABLES
status = lt_jstat
EXCEPTIONS
object_not_found = 1.
READ TABLE lt_jstat WITH KEY stat = 'I0045'. " TABG
IF sy-subrc = 0.
CONCATENATE lv_path '' lv_file INTO lt_files-docfile.
*zum löschen vormerken
CONCATENATE lv_path '' lv_file INTO lv_file2.
lt_files-wsapplication = wa_pd_custom-wsapp.
lt_files-statusintern = 'FR'.
lt_files-storagecategory = 'Z0001'.
APPEND lt_files.
Kurztexte
CLEAR lt_drat.
REFRESH lt_drat.
lt_drat-language = 'DE'.
lt_drat-description = wa_pd_custom-ktext.
APPEND lt_drat.
Objektverknüpfung zum Fertigungsauftrag
CLEAR lt_drad.
REFRESH lt_drad.
lt_drad-objecttype = 'PORDER'.
CONCATENATE lv_fauf lv_vg INTO lt_drad-objectkey.
APPEND lt_drad.
Dokument anlegen
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING: documentdata = ls_doc
IMPORTING: documenttype = lf_doctype
documentnumber = lf_docnumber
documentpart = lf_docpart
documentversion = lf_docversion
return = ls_return
TABLES: documentdescriptions = lt_drat
objectlinks = lt_drad
documentfiles = lt_files.
SHIFT lf_docnumber LEFT DELETING LEADING space.
FAUF-Nr.
lv_01 = lt_drad-objectkey.
Dokumentenart
lv_02 = ls_doc-documenttype.
DIS Nummer
lv_03 = lf_docnumber.
Fehler aufgetreten ??
IF ls_return-type CA 'EA'.
ROLLBACK WORK.
MESSAGE ID '26' TYPE 'I' NUMBER '000'
WITH ls_return-message.
ELSE.
COMMIT WORK.
Wenn einchecken ok, Datei löschen
IF ls_return IS INITIAL.
IF sy-batch = 'X'.
lv_epsfilnam = lv_file.
CALL FUNCTION 'EPS_DELETE_FILE'
EXPORTING
file_name = lv_epsfilnam
dir_name = lv_dir
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
build_path_failed = 5
delete_failed = 6
OTHERS = 7.
IF sy-subrc <> 0.
ENDIF.
ELSE.
CALL FUNCTION 'WS_FILE_DELETE'
EXPORTING
file = lv_file2
IMPORTING
return = sy-subrc.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
*Satz in ZPROZDATEN einfügen
wa_prozdaten-aufnr = lv_01.
wa_prozdaten-arbpl = wa_pd_custom-arbpl.
wa_prozdaten-werks = wa_pd_custom-werks.
wa_prozdaten-dokar = ls_doc-documenttype.
wa_prozdaten-doknr = lv_03.
wa_prozdaten-dokvr = ls_doc-documentversion.
CONCATENATE lv_path '' lv_file INTO wa_prozdaten-filep.
wa_prozdaten-datum = sy-datum.
wa_prozdaten-name = sy-uname.
wa_prozdaten-uzeit = sy-uzeit.
INSERT INTO zqm_prozdaten VALUES wa_prozdaten.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
regard Joerg -
Create document in Background with BAPI_DOCUMENT_CREATE2
Hi,
how can i create a document with the BAPI_DOCUMENT_CREATE2 in background (not in dialog)?
I want to upload the original from my front-end (Path: C:\test.pdf).
If i use the paramter "pf_http_dest = SAPHTTP", it didn't work.
I don't want to upload the file from the applicationserver (not SAPHTTPA).
I am thankful for any solution?
Thanks in advance.
SebastianThe straight answer is that it doesn't work.
The only workaround I've used befor is having a shared network folder that both your user and the user running the SAP dialog service have access to. This does work, but you could argue it is a little messy.
That windows user is probably named SAPservice<SID> on the OS level (or equivalent for Linux).
Windows Operating System User Settings in an SAP System - SAP NetWeaver Security Guide - SAP Library
Share a folder and grant both acess. Afterwards you can run the bapi with the network path.
espen -
BAPI_DOCUMENT_CREATE2 fails in Background
Hi everyone,
I wrote an ABAP-report calling BAPI 'BAPI_DOCUMENT_CREATE2'.
This ABAP has to create a document and upload files per FTP into DMS (Checkin)
Works Online fine (cause the BAPI avoids FTP as a GUI is online available) but miserably fails in background:
Message: RFC callback calls are not allowed in the ABAP...
This message comes from a failed call of the FM 'SYSTEM_START_REG_SERVER'
in the FM 'CV120_FTP_START_REG_SERVER' as described in an old thread (Error in Check in of Originals by BAPI In background)
Sample of the BAPI-call:
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = documentdata
pf_ftp_dest = 'SAPFTPA'
IMPORTING
documenttype = documenttype
documentnumber = documentnumber
documentpart = documentpart
documentversion = documentversion
return = return
TABLES
documentdescriptions = documentdescriptions
objectlinks = objectlinks
* documentstructure = documentstructure.
* documentfiles = documentfiles
* documentstructure = documentstructure.
documentfiles = documentfiles.
I tried a lot, even in 2 steps (first create the doc per BAPI, second checkin per call of CVAPI_DOC_CHECKIN)
but in everycase, i always get the same problem...
Any help will greatly be appreciated : i daily and manually (ok, even if 1 report launch per day is sufficent) have to upload aprox.
2000 PDFs ...
Thanks in advance for answering...
Edited by: Guillaume Delorme on May 5, 2010 11:08 AMHi everyone,
Due to holidays, i gotta post under another account...
There was a logical mistake in my problem:
-> i thought i had to do the physical checkin of the files while or after the BAPI_DOCUMENT_CREATE2-call.
In my case, the content-server is reachable from the app-server as it's been defined in the AL11.
The content-server is directly defined in table TDWD with complete directorypath as a vault-server (NO DVA-VAULT).
The SAP-FBs do actually handle two cases for file-checkin that can suit my concern::
-> DVA-Vault?->FTP-Connect for filetransfer
-> No DVA-Vault? ->Local GUI-Upload for filetransfer
For background-processing fails always the GUI-Upload -> normal
I don't use any DVA-Vault -> i must do something else.
Solution: Ridiculously easy...
*-> FIRST :Physical Checkin over a stupid TRANSFER DATASET for the file.
*If OK:
*->SECOND: Call of BAPI_DOCUMENT_CREATE2 with reference to the transferred File
* ->Structure BAPI_DOC_DRAW2:
* -> Short Dataname in BAPI_DOC_DRAW2-docfile1
* -> Datacarrier in BAPI_DOC_DRAW2-datacarrier1 (actually the key for the VAULT-server)
* -> App.type in BAPI_DOC_DRAW2-wsapplication1.
* -> Description, Documentype, username, laboratory are must-fields with my customizing too.
* ->Internal Table BAPI_DOC_FILES2:
* -> Short Dataname in BAPI_DOC_FILES2-docfile
* -> Datacarrier in BAPI_DOC_FILES2-storagecategory (actually the key for the VAULT-server)
* -> App.type in BAPI_DOC_FILES2-wsapplication.
* -> no other fields required for this table
* ->(...)
*endif.
Now it runs fine every 5 minutes and i handle about 3000 documents a day...
I give points to Phillip van den Heever who reminded me the AL11-Setting and i mark this topic solved as soon as i can...
Thanks to everyone and greets,
Guillaume Delorme -
Clarification of background processing and BAPI_DOCUMENT_CREATE2
Hello,
i am sorry to mention this long discussed topic,
but i would very appreciate to clarify how can i checkin new originals for a new document using background processing.
we are trying to use BAPI_DOCUMENT_CREATE2 to create a document and checkin original from a network path +
server\file.pdf+ .
i have read that i should add the path in AL11 - did it, how should i use it?
i have read that i should use the SAPFTPA & SAPHTTPA parameters when calling the function - i have these in SM59 and the connection test is successful - but what should i do with them?
will be very thankful for your help.
here's an example from our code:
call function 'BAPI_DOCUMENT_CREATE2'
exporting
documentdata = ls_doc
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
importing
documenttype = lf_doctype
documentnumber = lf_docnumber
documentpart = lf_docpart
documentversion = lf_docversion
return = ls_return
tables
documentdescriptions = lt_drat
objectlinks = lt_drad
documentfiles = lt_files.Hi,
Populate the document original information according as per below guideline.
The tables 'DOCUMENTFILES' contain the entries about originals that you you want to allocate to the document. The meanings of the structure fields are:
'SOURCEDATACARRIER': Data carrier name (optional) of a server on which
an original is stored
'STORAGECATEGORY': Name of the data carrier that you want to check
original into. The function module determines the
storage type, SAP Database, vault, or archive
using the name of the data carrier.
'DOCFILE': File name of the original
'WSAPPLICATION': Name of the workstation application. This entry is
necessary when no workstation application has been
assigned to the document info record or the new
original is of another type.
Regards
Keerthi -
BAPI_DOCUMENT_CREATE2 failed in background
Hi experts,
when i using this BAPI to create document, it works fine if executed on line. but when executed in background, it failed saying that 'Error while checking in and storing: &'.
the file is already on the application server like:
Erpr3d11\apps\SAP\PM\IMAGE\abc.jpg
can anyone help me? thanks a lot in advance!Hi Wei,
as you have marked this question as solved, I would kindly ask you to post if you have found a suitable solution for your requirement and how it was realised. This will help all other forum users to get similar issues solved too.
Best regards,
Christoph -
BAPI_DOCUMENT_CREATE2 - Document upload to DMS - Back ground
Hi,
We are trying to uploda a file into DMS(CV01N) from SAP R/3, BAPI 'BAPI_DOCUMENT_CREATE2'. This works fine in foregroung but when we ececute it in background, we get an error saying 'Error while checking in and storing'.
Could anyone please suggest me if we can sucessfully execute in back ground mode?
Thanks,
Ranjith Singh.it is not possible to download in background to a presentation server (your local PC) hence it is not possbile to upload either.
when you submit the program to the background thenthe session is no longer attached to the PC that created it.
Because of this you have to go via the application server.
compare hundred of threads by searcing the ABAP forum with keywords +download +background
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c -
Bapi_Document_Create2: Check In Problem
Hi All,
we want to perform Transaction CV01n via FM.
I tried the BAPI_DOCUMENT_CREATE2 to to the Job but i cant find the correct Parameter to Check in Documents into the Archiv.
The Parameters lt_files-storagecategory = 'SAP-System' and lt_files-storagecategory = 'VAULT' are shown but the Archiv is missing.
I found the Destiation Link in Transactin OAC0 (Content repository), it has te Value XY and The Type is ARCHLINK.
Any Ideas on this toppic?
Best Regards
SRHi everyone,
Due to holidays, i gotta post under another account...
There was a logical mistake in my problem:
-> i thought i had to do the physical checkin of the files while or after the BAPI_DOCUMENT_CREATE2-call.
In my case, the content-server is reachable from the app-server as it's been defined in the AL11.
The content-server is directly defined in table TDWD with complete directorypath as a vault-server (NO DVA-VAULT).
The SAP-FBs do actually handle two cases for file-checkin that can suit my concern::
-> DVA-Vault?->FTP-Connect for filetransfer
-> No DVA-Vault? ->Local GUI-Upload for filetransfer
For background-processing fails always the GUI-Upload -> normal
I don't use any DVA-Vault -> i must do something else.
Solution: Ridiculously easy...
*-> FIRST :Physical Checkin over a stupid TRANSFER DATASET for the file.
*If OK:
*->SECOND: Call of BAPI_DOCUMENT_CREATE2 with reference to the transferred File
* ->Structure BAPI_DOC_DRAW2:
* -> Short Dataname in BAPI_DOC_DRAW2-docfile1
* -> Datacarrier in BAPI_DOC_DRAW2-datacarrier1 (actually the key for the VAULT-server)
* -> App.type in BAPI_DOC_DRAW2-wsapplication1.
* -> Description, Documentype, username, laboratory are must-fields with my customizing too.
* ->Internal Table BAPI_DOC_FILES2:
* -> Short Dataname in BAPI_DOC_FILES2-docfile
* -> Datacarrier in BAPI_DOC_FILES2-storagecategory (actually the key for the VAULT-server)
* -> App.type in BAPI_DOC_FILES2-wsapplication.
* -> no other fields required for this table
* ->(...)
*endif.
Now it runs fine every 5 minutes and i handle about 3000 documents a day...
I give points to Phillip van den Heever who reminded me the AL11-Setting and i mark this topic solved as soon as i can...
Thanks to everyone and greets,
Guillaume Delorme -
Checkin originals in background
Hello,
I am an ABAPer, and I am using 'BAPI_DOCUMENT_CREATE2' to create document and checkin original files. BAPI is working fine in R/3 (via SE37) with the file on my PC (C:\temp\file.doc). But, when I call call this BAPI from portal (frontend), document checkin is not happening, I think this is due to the file path (C:\temp\file.doc) is not recognized when the BAPI is executed in the backend. How do I checkin a file in background from portal? Any configuration in Document Management has to be done to acheive this? Any ideas?
Thank You,
ChandraHi Chandra,
Unfortunately BAPIs are not so batch-friendy. API functions provide
more flexibility in special cases concerning the checking in and checki
out of documents. Therefore better use the functions modules like
CVAPI_DOC_CREATE of the Function group CVAPI01.
Please pay attention at the testprograms provided in the note 504692.
Pay attention to the fact that in background the originals are
loaded from an application server, not from the frontend.
In note 504692 you will find a collection of example programs which
can be used as a workaround to BAPIs as they are not covering all
possible scenarios.
Hope this information is usefull.
Best regards,
Christoph -
DMS: Checkin Originals in Background
Hello,
I am using <b>'BAPI_DOCUMENT_CREATE2'</b> to create document and checkin original files. BAPI is working fine via SE37 with the file on my PC (C:\temp\file.doc). But, when I call call this BAPI from portal, document checkin is not happening, I think this is due to the file path (C:\temp\file.doc) is not recognized when the BAPI is executed in the backend. How do I checkin a file in background from portal? Do I need to specify any other parameters to the BAPI? or do I have to do anything on portal? If I call a BAPI from Portal, where this RFC is executed in the background?
Any ideas?
Thank You,
ChandraAny Suggestions? Pls share with me.
Thank you all,
Chandra -
How to give Common Background color for all JPanels in My Swing application
Hi All,
I am developing a swing application using The Swing Application Framework(SAF)(JSR 296). I this application i have multiple JPanel's embedded in a JTabbedPane. In this way i have three JTabbedPane embedded in a JFrame.
Now is there any way to set a common background color for the all the JPanel's available in the application??
I have tried using UIManager.put("Panel.background",new Color.PINK);. But it did not work.
Also let me know if SAF has some inbuilt method or way to do this.
Your inputs are valuable.
Thanks in Advance,
Nishanth.CIt is not the fault of NetBeans' GUI builder, JPanels are opaque by default, I mean whether you use Netbeans or not.Thank you!
I stand corrected (which is short for +"I jumped red-eyed on my feet and rushed to create an SSCCE to demonstrate that JPanels are... mmm... oh well, they are opaque by default... ;-[]"+)
NetBeans's definitely innocent then, and indeed using it would be an advantage (ctrl-click all JPanels in a form and edit the common opaque property to false) over manually coding
To handle this it would be better idea to make a subclass of JPanel and override isOpaque() to return false. Then use this 'Trasparent Panel' for all the panels where ever transparency is required.I beg to differ. From a design standpoint, I'd find it terrible (in the pejorative sense of the word) to design a subclass to inconsistently override a getter whereas the standard API already exposes the property (both get and set) for what it's meant: specify whether the panel is opaque.
Leveraging this subclass would mean changing all lines where a would-be-transparent JPanel is currently instantiated, and instantiate the subclass instead.
If you're editing all such lines anyway, you might as well change the explicit new JPanel() for a call to a factory method createTransparentJPanel(); this latter could, at the programmer's discretion, implement transparency whichever way makes the programmer's life easier (subclass if he pleases, although that makes me shudder, or simply call thePanel.setOpaque(false) before returning the panel). That way the "transparency" code is centralized in a single easy to maintain location.
I had to read the code for that latter's UI classes to find out the keys to use (+Panel.background+, Label.foreground, etc.), as I happened to not find this info in an authoritative document - I see that you seem to know thoses keys, may I ask you where you got them from?
One of best utilities I got from this forum, written by camickr makes getting these keys and their values very easy. You can get it from his blog [(->link)|http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/]
Definitely. I bit a pair of knucles off when discovered it monthes after cumbersomely traversing the BasicL&F code...
Still, it is a matter-of-fact approach (and this time I don't mean that to sound pejorative), that works if you can test the result for a given JDK version and L&F, but doesn't guarantee that these keys are there to stand - an observation, but not a specification.
Thanks TBM for highlighting this blog entry, that's the best keys list device I have found so far, but the questions still holds as to what specifies the keys.
Edited by: jduprez on Feb 15, 2010 10:07 AM -
Closing the Background report engine
I use a menu that can call several reports, and when they open, the Reports Background Engine runs. I understand why it is useful to keep this open while the main app is on, but it does not close out automatically when the app closes. Is there a command that will do this?
Thanks,
SaraI Guess,
Add_Parameter(pl_id, 'ORACLE_SHUTDOWN', TEXT_PARAMETER, 'YES') will do (pl_id is the parameter list that you must have created to run each individual report) -
Report program when run in background job getting cancelled immediately
Hi
When i run a program in foreground i am able to see the output. But when run in background not able to run the job successfully. The job is getting cancelled immediately.
I am using the below function module for output display. Should i need to pass any parameters in the below function module so that i can run the program in background successfully.
CALL METHOD DETAIL_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = IS_LAYOUT
I_SAVE = 'A'
IS_VARIANT = GS_VARIANT
CHANGING
IT_FIELDCATALOG = IT_FIELDCATALOG
IT_OUTTAB = BLOCKED_STOCK_TAB_ALV[].
Please suggest.
Thanks and regards
Rajani YeluriHi Rajani.
ALV require the DRYPOR(screen) for display but incase you run in back ground which have to write to spool but in spool we can only write in format of LIST REPORT not inter-active report like ALV. That why
system cancelled your process immediately.
Hope it helps.
Sayan. -
Layout variant is not working in background in ALV report
Hi,
I have one LAV report to send the report output through mail in foreground and backgroud.Final internal table is having 46 fileds to display the output.But here user is saving the layout variant and sending that layout variant output to mail id in excel format with zip file.Its working in foreground.But in background its not working.Even if we select the layout variant,its sending all the 46 fileds to mail.
here we have used the below FM to update the fieldcat itab.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
IMPORTING
et_fieldcat = it_fieldcat[]
es_variant = v_disvariant
EXCEPTIONS
no_infos = 1
program_error = 2
OTHERS = 3.
In for ground NO_OUT = 'x' for non selected fields and NO_OUT = ' ' for selected fields.
But in background NO_OUT = ' ' for all the fileds, even if we select the layout variant.
Please suggest me with the solution.
Regards,
Jayaramhi ,
Do according to this
SORT t_ekbe by belnr.
if t_ekbe[] is not initial .
SELECT MBLNR
BWART
SMBLN
ERFMG " This is the new added field
erfme " This is the new added field
INTO CORRESPONDING FIELDS OF TABLE t_mseg
for all entries in t_ekbe
from mseg
where mblnr = t_ekbe-belnr
AND bwart = '101'.
endif.
after this
loop at t_ekbe .
loop at t_mseg where mblnr = t_ekbe-belnr .
t_ekbe-ERFMG = t_mseg-ERFMG .
t_ekbe-erfme = t_mseg-erfme .
modify t_ekbe transporting ERFMG erfme .
clear t_mseg .
endloop.
clear t_ekbe .
endloop.
Regards
Deepak .
Maybe you are looking for
-
Same page with tables works well on IE but not on Firefox or Safari
This qs may have been asked already but I am new to the forum. I have created a page in DW using tables and everything fits beautifully in it. It works really well when tested on IE but all the alignments are way off on Mozilla Firefox and Safari(mac
-
How to store the Arraylist value in variables ?
Hi Here i use arraylist and i like to store all the arraylist in different variables Please tell the way . ArrayList list = new ArrayList(); list.add("A"); list.add("B"); list.add("C"); list.add("D"); String a="" String b=""; String c="" String d="";
-
Charger not supported messagew on a 3109
Hi, I have 3109 & have just tried to charge & getting a message "charger not supported"?? Can anyone help??
-
Build the main Guest Additions module Failed
Hi all, I am not very sure if I am in the correct forum here. My problem is I cannot install the VirtualBox Guest Additions 4.2.12_84980 on my Oracle Linux 5 update 6_x86_64 bits system. I followed the instructions in a tutorial : cd /etc/yum.repos.d
-
Hello Everyone. Could you please help with segregation of SSIDs Base on AP , I have the following scenario: Head Office : 2 SSIDs (HO_Wifi , Guest) , Access Points which are working in connected mode and grouped on the default ap group . Remote site