Transfer GOS Attachment (Single/Multiple) from custom program to XK01
Hi,
GOS - Generic Object Service is a way one can attach single / multiple attachment. I have a custom program where there is a GOS with some attachment (used CL_GOS_MANAGER class).
Next I need to send / transfer this GOS attachment from my custom program to say a standard transaction , eg XK01.
Whether we can achieve this functionality, ie. we are able to create/save attachment but is there a way to send attachment (not via email) such that the same attach itself to the GOS of the standard transaction. I don't see any method in the CL_GOS_MANAGER class by which we can achieve this!
Any suggestion/solution will be highly appreciated!
Thanks,
Deb
Hi,
I am trying to send attachment linked to a custom BO to standard BO eg, LFA1 using 'GOS_SERV_TOOLS_TEST' (copy_linked_objects).
Surprisingly, I am able to copy/send attachment list within same BO (LFA1) from one LIFNR to another LIFNR. But the same method does not work when I try to copy attachment between diff BO example from VENDOR BO to MATERIAL BO. Why is it so?
Also it does not work between a custom BO & standard BO. Please suggest in case I am missing on anything!
Thank,
Deb
Similar Messages
-
GOS(Generic Object Services) for Custom program ?
Hi All,
My requirement is to have GOS option to attach document for Custom program against each record.
Do anybody have faced the same kind of requirement,please let me know how to do.
Bharathi.JHi Bharathi
i to got the same requirement
through manually im attaching the files,notes and URL's
but how to attach through any class
i use CL_GOS_DOCUMENT_SERVICE in that
CREATE_ATTACHMENT method
but it is not attaching the files to my GOS menu
can u help me
Thanks
Surendra -
How to transfer GOS attachment to my work item
Hi Friends,
I have the following requirement. The user while creating a Appropriation request in tcode IMA1N will create an attachment using Generic Object Services(GOS). once he saves my workflow will trigger and it will go to approval. I need to show the attachment created using GOS in my Work item. How to achieve this. Please advice.I have some annotations:
The object type ARCHIVE is for archived Data Files from the DataArchiving. The object type for ArchiveLink documents is IMAGE
The default method is .Display to display the document.
The GOS-Attachment is not a SAP ArchiveLink document. This attachment is stored in SOOD and linked via the GOS-relationship table SRGBTBREL
The business object, that can be used here is: SOFM
The object instance needs to be found with a custom self-made background method, to find the correct link and create an object instance.
After that, this instance can be used as a secondary method in the work item's execution or attached to the ADHOCOBJECTS as already mentioned here.
Good luck,
Florin
P.S.: Similar reply cross-posted to SAP-WUG -
Create idocs from custom program
hi
i have a custom program and will have custome segements.
so i can fill both control and data records.from here i need to generate idoc..any FM's to do this??
appreciate any help.
thanks
sivaHi Siva ,
There is no FM to fill segments data , you need to write your own logic fill IDOC data ,
then use 'MASTER_IDOC_DISTRIBUTE' to send IDOC.
check this sample code :
DATA :idoc_line TYPE edidd,
idoc_data TYPE STANDARD TABLE OF edidd.
x_a00-transaction_type = c_trans_type_a00.
x_a00-organisation_id = x_externalid.
x_a00-file_type = 'XXX'.
x_a00-creation_date = sy-datum.
x_a00-creation_time = sy-uzeit.
x_a00-generation_number = ''.
x_a00-int_file_type = 'XXX'.
idoc_line-sdata = x_a00.
idoc_line-segnam = 'ZX_A00'.
cnt_no = cnt_no + 1.
idoc_line-segnum = cnt_no.
APPEND idoc_line TO idoc_data.
DATA : x_idoc_control like edidc.
x_idoc_control-mestyp = x_mestyp. "Message type
x_idoc_control-idoctp = x_idoctp. "Basis Idoc Type
x_idoc_control-cimtyp = space. "Customer extension
x_idoc_control-mescod = space.
x_idoc_control-sndpfc = space.
x_idoc_control-sndprn = x_sender_no.
x_idoc_control-sndprt = x_sender_type.
x_idoc_control-rcvpfc = space. "Partner Role Receiv.
x_idoc_control-rcvprn = x_distributor. "Partner Nr.
x_idoc_control-rcvprt = x_sp_type. "Partner Type Receiv.
Regards
Appana -
Add attachment button disapear from Customer screen ( framework )
We did some personalizations in 12.1.2; for one reason ( we don't know why ) add attachment butotn disappear from attachment tab in client screen ( framework )
any idea
Thanks
MarcHi Marc,
i am not clear with your question.
through personalize page option, you can check the rendered property for the same.
Regards,
Naren. -
To transfer Selection Screen field value from a program to another Program
Hello,
Program Z_ABC having Select Option Field XYZ.
I need to transfer all the values entered on Selection Option Field XYZ to another Program Dialog Z_DIALOG.Hi,
Try to use the function module 'RS_REFRESH_FROM_SELECTOPTIONS'.
For ex:
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = it_soptions
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc <> 0.
EXIT.
ENDIF.
SUBMIT riaufk20 WITH dy_selm = 'D'
WITH SELECTION-TABLE it_soptions
AND RETURN.
Hope it solves your issue.
Regards,
Chenthamarai. -
Calling Standard screen from custom program
Hi all,
My requirement is
1)Either to fix a link(say from a button) on my custom screen for material creation,to call mm01 basic data screen for image upload.
2) Or to upload material image directly to the corresponding table(using any fm or something).
,please show me light on the above issue.
Thanks in advance
SriHi Jovito,
I also think the same that it's not possible. Now my issue is how to get my requirement.
FYI..
To open Classification screen directly we have a function module CLFM_OBJECT_CLASSIFICATION. But if I want to open IA06
Inspection characterstics screen we don't have any FM or API to do the same.
So how will I get my requirement done. That why I use the BDC call transaction to open IA06 Insp. characterstics screen but here I am facing this Back issue.
Please advice if there is any suggestion. -
GOS on custom program not saving links
Hi all, I've just implemented GOS to a Z program following the instructions of a SDN contribution document called "How to attach documents to any custom program using GOS". I simply want to add GOS to the selection screen of the program in order to locat and store documentation regarding this Z program.
I run the program and the GOS button is displayed, I add some link or document and then I display the list of attachments and everything seems to be working ok. So when I leave the program and run it again no list of attachments is available as this is greyed out. Anyone could help please.
Steps I performed:
I created the Business object saved and released to implemented with the following:
Key -> programName (TRDIR-NAME)
and redefined the GOSAddObjects method like this:
BEGIN_METHOD GOSADDOBJECTS CHANGING CONTAINER.
DATA:
SERVICE(255),
BUSIDENTIFS LIKE BORIDENT OCCURS 0,
LS_BORIDENT Type BORIDENT.
CLEAR LS_BORIDENT.
LS_BORIDENT-LOGSYS = SPACE.
LS_BORIDENT-OBJTYPE = 'ZGOS'.
LS_BORIDENT-OBJKEY = OBJECT-KEY.
APPEND LS_BORIDENT TO BUSIDENTIFS.
SWC_GET_ELEMENT CONTAINER 'Service' SERVICE.
SWC_SET_TABLE CONTAINER 'BusIdentifs' BUSIDENTIFS.
END_METHOD.
Z program:
REPORT Z_RUBS_TEST_GOS.
CONSTANTS: OBJTYPE TYPE BORIDENT-OBJTYPE VALUE 'ZGOS'.
DATA: MANAGER TYPE REF TO CL_GOS_MANAGER,
OBJ TYPE BORIDENT.
PARAMETERS: MATNR TYPE MARA-MATNR.
AT SELECTION-SCREEN OUTPUT.
CLEAR OBJ.
* SET OBJECT TYPE TO 'ZGOS'
OBJ-OBJTYPE = OBJTYPE.
OBJ-LOGSYS = 'OP1CLNT200'.
* SET OBJECT KEY = REPORT NAME
SELECT SINGLE NAME FROM TRDIR INTO OBJ-OBJKEY
WHERE NAME = SY-REPID.
* CALL GOS MANAGER WITHOUT CONTAINER (WILL BE DISPLAYED IN THE TOOLBAR)
CREATE OBJECT MANAGER EXPORTING
IS_OBJECT = OBJ EXCEPTIONS
OTHERS = 1.You must add COMMIT WORK (AND WAIT or not) somewhere in your application (add a button that the user), or use CREATE OBJECT manager EXPORTING ... IP_NO_COMMIT = space or 'R' ... so that the COMMIT WORK will be done automatically by the GOS manager. Note: IP_NO_COMMIT = 'R' means that the service will start in its own LUW (using synchronous RFC).
For more information, read the [SAP Library - GOS - Publishing unique object|http://help.sap.com/saphelp_nw2004s/helpdata/EN/7e/4dbeb62c8e11d4a39e00a0c943858e/frameset.htm] (well, it doesn't talk about 'R'...) -
Passing data to custom smartform from a custom program...
Hello Gurus,
Since, the function module gets generated dynamically at runtime when smartform is activated, I know that first I should use "SSF_FUNCTION_MODULE_NAME" and pass custom smartform name to it to get the name of function module. Then I have to use call function '/XXXXXXXXX'.
Now, I am writing a custom code and I want the data from my select program in custom program to be passed to smartform ? How can I pass the data from my custom program to smartform ? Do I pass it before using function module "SSF_FUNCTION_MODULE_NAME" ? If yes, how ?
Regards,
Rajesh.hi,
u have to declare ur structures in form interface and can retrive the data from custom program.
check this sample code.
declare structure in interface.
WA_MKPF TYPE MKPF.
write ur custom code lik this.
DATA: wahz TYPE zmemigo_form_header,
wa_mkpf TYPE mkpf.
DATA: t_itemz LIKE zmemigo_form_item OCCURS 0,
t_mseg TYPE mseg OCCURS 0,
waitemz TYPE zmemigo_form_item,
waitem TYPE mseg.
DATA : form_name TYPE tdsfname VALUE 'ZPS_STN'.
DATA : fnc_module TYPE rs38l_fnam.
SELECT SINGLE mblnr INTO wa_mkpf-mblnr FROM mseg
CLIENT SPECIFIED WHERE mandt EQ sy-mandt
AND mblnr EQ p_mblnr
AND mjahr EQ p_mjahr
AND bwart EQ '351'
AND shkzg EQ 'H'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fnc_module
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION fnc_module
EXPORTING
wa_headz = wahz
wa_mkpf = wa_mkpf
TABLES
it_itemz = t_itemz
it_mseg = t_mseg
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Upload file in custom program and pass it to workflow
Hi, guys. Now, i have the requirment to allow user to upload file in the custom program and trigger the workflow with the attached file.
Any one has experience on this? i would like to know how to upload the file from custom program, and how to create instance of the BO "SOFM". Then, i can pass this instance to workflow.HI Jrockman,
Please check the solved reply in this thread
Passing a file from a report to workflow container
Hope this would solve your issue.
Good luck
Narin -
How to get the custom program generated in Background
Dear Freinds,
I have written a below code in my submit program ( zreport) .
REPORT ZHRRPCPRRU0_SUBMIT NO STANDARD PAGE HEADING MESSAGE-ID zhr_msg.
SUBMIT RPTQTA00 VIA SELECTION-SCREEN
WITH pnpbegda = sy-datum
WITH pnpendda = lv_date
with pnppernr = '99007057'.
As per your logic i have used the submit program and i am able to default the dates in the Standard program RPTQTA00 , that is perfectly correct . Now if run the standard report it is giivng me the ouput ..so the foreground concept is working correctly.
Now if iam scheduling the Z report of the custom report (z program) where iam calling the submit program
it is just scheduling and further when i look at the sm37 i can see the job getting finished . However , i dont find any spool because the standard report has not been executed , with my custom report (using the logic with submit program above in zprogram ) i am calling the standard program (RPTQTA00).
so could you please let me know how the standard program will execute and get the spool genereated? in the case of background
because when i have executed only the standard report in background i can see that it is being exceuted spool as well, however when iam calling from custom program no spool is created because my custom program only submiting the standard report and it is not executing the standard report in the case of backround ...because when iam running the custom program in the Foreground it is calling the standard program and getting the values defaulted based on the parameters which i passed , so it gets defaulted later iam running the standard program manually .
So please could you let me know how will the standard program also gets genereated in the backgroung along with my custom report.
Thanks in advance
regards
madhuri,Hi Can you try the following?
Hope this helps... (Taken from help)
Example
Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
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
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF. -
Copy mode of payment from customer master data to sales order,
Hi Gurus,
Hope all is fine.
I have a small doubt. If we want to transfer the mode of payment from customer master data to sales order, do we have to use Exit- MV45AFZZ.
Can't we transfer the data without the exit?Hi,
I have tested this in sand box.Thought the customer master is having payment method ( payer ) ,It is not copying from customer master to sales order but if you maintain manually in sales order ,it is copying into billing document level.FYI see below snap shot.
Note:If you want it from customer master into sales order,may be you need to take help of abaper on this.
BR's,
Naren -
Writing custom program errors to SLOG
I am looking for a way to put errors from custom program ( which would run as job) to system log, which should be visible via SM21. Can any of you help me with a function module with which I can achieve it ?
Hi Indrade,
Is it your first post in SDN ? Welcome!
for your problem try the following procedure:
1. Refresh memory
CALL FUNCTION 'BAL_GLB_MEMORY_REFRESH'
EXPORTING
* I_AUTHORIZATION =
i_refresh_all = 'X'
* I_T_LOGS_TO_BE_REFRESHED =
EXCEPTIONS
not_authorized = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2. Create a Log
* define some header data of this log
l_s_log-extnumber = pu_ext_number.
l_s_log-aluser = sy-uname.
l_s_log-alprog = sy-repid.
l_s_log-object = pu_object.
l_s_log-subobject = pu_subobject.
* create a log
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = l_s_log
IMPORTING
e_log_handle = pc_log_handle
EXCEPTIONS
log_header_inconsistent = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
3. Add a message to the Log
DATA:
l_s_msg TYPE bal_s_msg,
l_log_handle TYPE balloghndl.
* define data of message for Application Log
l_s_msg-msgty = pu_msgty.
l_s_msg-msgid = pu_msgid.
l_s_msg-msgno = pu_msgno.
l_s_msg-msgv1 = pu_msgv1.
l_s_msg-msgv2 = pu_msgv2.
l_s_msg-msgv3 = pu_msgv3.
l_s_msg-msgv4 = pu_msgv4.
l_s_msg-probclass = pu_probclass.
l_s_msg-context-value = pu_context.
GET TIME STAMP FIELD l_s_msg-time_stmp.
* add this message to log file
* (I_LOG_HANDLE is not specified, we want to add to the default log.
* If it does not exist we do not care =>EXCEPTIONS log_not_found = 0)
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = l_log_handle
i_s_msg = l_s_msg
EXCEPTIONS
log_not_found = 0
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
4. Save Log
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_t_log_handle = p_t_log_handle
EXCEPTIONS
log_not_found = 1
save_not_allowed = 2
numbering_error = 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.
I hope it will helps.
Please remember to reward points if the answer is useful, and to close the post when your problem is solved
Regards, Manuel -
Removing Product Libraries (OEXOEHDR, OEXOELIB) links from CUSTOM.PLL
Im unable to remove attached product libraries from CUSTOM.PLL. After removing (OEXOEHDR, OEXOELIB) in Oracle Forms Builder Im recompiling and saving. If I reopen the same custom.pll, deleted libraries are still attached.
Any one encountered this problem? Please reply.
Thanks,
Kishore ReddyIm unable to remove attached product libraries from CUSTOM.PLL. After removing (OEXOEHDR, OEXOELIB) in Oracle Forms Builder Im recompiling and saving. If I reopen the same custom.pll, deleted libraries are still attached.
Any one encountered this problem? Please reply.
Thanks,
Kishore Reddy -
Multiple smartform call in a single custom program
Hi,
I have a custom program from where i have to call A4 and A3 size smartforms. If i use SSF_OPEN and then call to smartforms and SSF_CLOSE it gives me error like previous martform request is not completed.
Can anybody provide me the code how to call first A4 size smartform and then A3 size in a single call?
also is there a need to provide something called TRAY for printing the pages?
Regards,
CooldeepDid you set the NO_OPEN field and the NO_CLOSE field of the control structure for every called form between SSF_OPEN and SSF_CLOSE. (*)
But are you sure it is possible (and advisable) to merge two form spools of different format (2 different trays) in a single print request ? (**)
Regards,
Raymond
(*) ref [Printing Several Forms in One Print Request|http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
(**) Also check your parameters and compare with sample report SF_EXAMPLE_03
Maybe you are looking for
-
Not able to take photo on lumia 920
not able to take photo by touching screen on lumia 920.pls respond
-
How do you automatically maximize the active video when it changes...
Hey guys, I'm looking for a way to automatically maximize the next video in queue when viewing videos online. The specific example I am looking for is here: NHL.com As you'll see, when the next video in line plays the screen minimizes to regular size
-
How to Alert RFC connection failure via message mapping? Kindly Help!
Hi Experts, I have a JMS - XI - RFC scenario. JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system. I have a requirement where I have to monitor RFC connection failure because of the remote R/3
-
Values of measures are not displayed
Hi, We're using BI-APPS version 7.9.6. I created a query consisting of a project number and a measure called actual Raw cost (of commitments). The following query is sent to the database: select distinct D1.c2 as c1, D1.c1 as c2 from (select sum(T668
-
I do not have a firefox button and sweetpaks keeps popping up and i cannot uninstall
i have tried to uninstall sweetpaks and it asks me to hit the firefox button. I do not have one. I uninstalled firefox and reinstalled it and the sweetpacks is still there. I have successfully uninstalled it from programs and it is no longer on inter