How to create attachments from an abap program?
I have an abap report that shows material documents.
Now by clicking on a button (at the end of each row), it should allow the user to attach a document.
How to achieve this?
(I tried to see the code behing the Private Objects of a document at FB03 but I could not decipher it much).
Thanks,
Ven..
CONSTANTS : objtype TYPE borident-objtype VALUE 'ZGOS2'.
DATA : manager TYPE REF TO cl_gos_manager,
obj TYPE borident,
gs_lopr TYPE sibflpor.
parameter: srlno type matnr.
IF srlno IS NOT INITIAL.
obj-objtype = objtype.
obj-objkey = srlno.
gs_lopr-instid = srlno .
gs_lopr-typeid = 'ZGOS2'.
gs_lopr-catid = 'BO'.
AT SELECTION-SCREEN OUTPUT.
CREATE OBJECT manager
EXPORTING
is_object = obj
is_bc_object = gs_lopr
IP_NO_COMMIT = 'R' "This is commit document for that material.
EXCEPTIONS
OTHERS = 1.
ENDIF.
try this it will work
Similar Messages
-
HOW TO creat BAR CHART using ABAP Programming
DEAR ALL,
I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
Regards,
VJOn earlier versions, you can do something like this.
[code]
REPORT ZRICH_0005 .
DATA: BEGIN OF ITAB_DATA OCCURS 0,
DATANAME(15),
QUANTITY1 TYPE I,
QUANTITY2 TYPE I,
QUANTITY3 TYPE I,
END OF ITAB_DATA.
Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
OPTION(20),
END OF ITAB_OPTIONS.
ITAB_DATA-DATANAME = 'Maple'.
ITAB_DATA-QUANTITY1 = 5500.
ITAB_DATA-QUANTITY2 = 6200.
ITAB_DATA-QUANTITY3 = 5900.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Oak'.
ITAB_DATA-QUANTITY1 = 3500.
ITAB_DATA-QUANTITY2 = 5200.
ITAB_DATA-QUANTITY3 = 4400.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Cherry'.
ITAB_DATA-QUANTITY1 = 1800.
ITAB_DATA-QUANTITY2 = 2200.
ITAB_DATA-QUANTITY3 = 1900.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = 'Jan'
COL2 = 'Feb'
COL3 = 'Mar'
TITL = 'Lumber Usage in $'
TABLES
DATA = ITAB_DATA
OPTS = ITAB_OPTIONS
EXCEPTIONS
OTHERS = 1.
[/code]
Regards,
Rich Heilman -
How to create a job thru ABAP program for calling a program with variant???
Hello experts,
can u give me step wise procedure to create jobs for a program with a variant name thru ABAP???
Also, can a transaction can be scheduled as a job to run in background with a variant name???
Edited by: SAP USER on Jul 22, 2008 6:08 AMHi,
To create a job through ABAP program you can do the following.
Go to Menu bar.
In there, go to SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
Then give the JOB NAME and CLASS in the screen that comes up.
This is how we schedule a program.
Now, to create a variant for a program -
First activate your program in SE38. Then execute it .
Now, click on SAVE button. It will open up the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
Hope this helps.
Regards,
Hari Kiran -
How to read fields from an ABAP Programa
Hello everyone.
The need of the client is to create an Interactive form and first ask for some data in order to query the rest of the information needed for the layout . All this is using only ECC Backend, we do not have portal yet.
So I'm not sure if this is posible. I´m imagine the first page Adobde form with the parameters and then take this values to query the tables needed information and then present a new adobde form with the layout definend by the client.
Is there any MF to read the values of each field in the Adobe interactive form?
Thanks in advance for your help.Hi Joaquin,
You have the option of using webservice with the adobe form. provided that the user have access to the webservice. you need to create a FM and convert it to webservice in R3.
But again, from my experience, it is not advisable to put to much logic in the form itself as it will slow it down. The form is better use to display data with a little bit of dynamic elements. -
How to generate an OUTBOUND INVOICE IDOC from the ABAP Program?
How to generate an OUTBOUND INVOICE IDOC from the ABAP Program? Any Function Module that can be used for this?
Hi
This is more of configuration
(1) Create a Output type with Medium 6 ( Check with your functional consultant)
(2) Maintain Partner Profiles using WE20 transaction
Idoc type - INVOIC02
Message type - INVOIC
Process Code - SD09
Regards
Madhan D -
How to call a BW Query from an ABAP program?
How to call a BW Query from an ABAP program?
hi
check this link
/people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i
/people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii
/people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
hope this helps
cheers -
How to get SAPGUI type (wingui or java) from an ABAP program
Hi everyone,
I am looking for a way to determine the sapgui type; that is if it is a wingui or javagui, from an abap program.
I know how to get the gui version with
CL_GUI_FRONTEND_SERVICES=>GET_GUI_VERSION
call and I also know how to get the platform with
CL_GUI_FRONTEND_SERVICES=>GET_PLATFORM
I simply want to determine if a certain sapgui running on a windows pc is a wingui or a javagui.
Any ideas?
Thanks,
MenelaosOk, I finally found it myself!
It is the function module:
RSAN_WB_TEST_GET_GUI_TYPE
at least on a 640 release.
Can I award me points?
Menelaos -
How to removed Editor Lock from an ABAP program
Hello, I would like to know how to remove an editor lock from an ABAP program that someone placed? The person who placed the lock is no longer active in the system. When I try to remove the lock, I get the message that the person placed the lock can remove it. Looks like only that person can remove the lock. Is there a way around this? Reactivating his id is not an option, in our case.
Hi,
I'm able to see the program in table TRDIR, but not able to edit it.
I have find one more table where we can edit is "PROGDIR"
Goto table " PROGDIR"
give the program name and execute
select the program and choose edit button
and remove "X" from the field "EDTX" to remove the lock for the program.
Regards,
Vaira. -
How I extract the coments from the ABAP program?
Hi,
I need to extract the coments from all ABAP programs using other program..
Someone may help me?
Thnaks,
Maria C.Ok....This is one of the weirdest requirements ever -:P
Use this -:)
TYPES: BEGIN OF SOURCE_TABLE,
LINE(150) TYPE C.
END OF SOURCE_TABLE.
DATA: T_SOURCE_TABLE TYPE STANDARD TABLE OF SOURCE_TABLE
WITH HEADER LINE.
DATA: PROG_NAME TYPE TRDIR-NAME.
NAME = 'ZAPP'.
READ REPORT NAME INTO T_SOURCE_TABLE.
That way, you get all ABAP lines in an internal table....
Just LOOP IT and do something like....
LOOP AT T_SOURCE_TABLE ASSIGNING <SOURCE>.
IF <SOURCE>-LINE+0(1) EQ '*'.
*Move it to a new table.
ENDIF.
ENDLOOP.
Also, you can SEARCH for the double ' symbols and do the same -:D
Greetings,
Blag. -
Error when Consuming a WS from an ABAP program
Hello,
I am getting an error when I try to consume a WS from my ABAP program. The error states ' Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/' and the code is SOAP: 14
This should be a simple call to a WS from BOBJ. I have searched OSS and SDN and I can't find any help. We are using 7.01 SP3
Actually I watched the blog by Thomas Jung to get me started and thing went well except forthe part where I was supposed to create the logical port via SOAMANAGER. I got this error 'Error: Initial value "context operation table" in methodDELETE_INVALID_INTERFACE_NODES of class CL_SRT_WSP_CONFIG_SIDL' so I used LPCONFIG instead and them SM59.
Has anyone encountered something like this?
Thanks!
RichOk so I got the bright idea of putting an external breakpoint in the DELETE_INVALID_INTERFACE_NODES method of class CL_SRT_WSP_CONFIG_SIDL and interestingly I think I am on to something. The code that is throwing an expection is srt_wsp_error_is_initial lt_operations[] 'context operation table'. "#EC NOTEXT at approximentally line 89.
So I am doing my amateur sleuthing in the debugger and it leads me to the WSDL and what looks like a missing operation for a port type. I say this b/c all the port type /port type tags have operation/operation tags embedded within them. simliar to this
<portType name="Real-time_Services" />
- <portType name="Batch_Jobs">
- <operation name="Oracle">
<input message="tns:Oracle_Input" />
<output message="tns:Oracle_Output" />
</operation>
</portType>
- <portType name="Realtime_Service_Admin">
- <operation name="Get_RTService_List">
<input message="tns:Get_RTService_List_Input" />
<output message="tns:Get_RTService_List_Output" />
</operation>
- <operation name="Run_Realtime_Service">
<input message="tns:Run_Realtime_Service_Input" />
<output message="tns:Run_Realtime_Service_Output" />
</operation>
- <operation name="Get_RTMsg_Format">
<input message="tns:Get_RTMsg_Format_Input" />
<output message="tns:Get_RTMsg_Format_Output" />
</operation>
</portType>
Note the first port type = Real-time_services doesn't have an end port tag and in the debugger my ABAP is shortdumping when trying to proess this port type
I think I found my error. Can anyone who has seen this before verify this for me before I give the WSDL creator heck
Thanks
Rich -
How do we call smartforms in abap program or web services
how do we call smartforms in abap program or web services
How many types of smartforms are there?
points will be rewardedHi
See this sample program
Using the fun module smartform is called from the program
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
<b>call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'</b>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function <b>FM_NAME</b>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
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.
<b>Reward points for useful Answers</b>
Regards
Anji -
Is it possible to make a call to an Infotype from an ABAP program?
Dear friends,
I created a new infotype 9*** using transaction pm01 and it works fine. What i need to do is to make a call to this infotype from an abap program without going through transaction pa30. Is it possible to do that? Thank you in advance.
Sincerely,
hajarHi,
The HR_MASTERDATA_DIALOG might need some tweaking.. we use a custom Program on the lines of SAP's
'perform rp_infotyp(sapfp50g)' that is more user friendly.. let me know if u need more info..
Good Luck,
Suresh Datti -
How to make a transport of ABAP Program to a QA environment
Hi forum and sorry for my easy question, but i am a newby in ABAP
How can i a transport an ABAP program to QA environment?... is the same machine only changes the mandant.
Thnks
Josue CruzYou need have transport request for ABAP program.
Transport Request are two types :
1.customizing
2 work bench
customizing - it is related to SPRO Transaction and Functional people will create Customizing request
Work Bench Request - normally irt realeted to ABAP Develper. and all about SE38 Programs ,Data dictinary and so on..
If you want to to release transport request ,then you need to use SE10 or SE09 Transaction.
Goto SE10 and see ur transport request -.it will have sub request #
Select Sub request #->overall check -Syntax check
then Activate check
then click on release dirctly button(Looks like Bus)
activate
now select main request and click on release directly button.
check the status - by using transport logs at SE10 transaction,you need to have sy-subrc eq 0
when you get sy-subrc eq 4 then you deleted something in ur program ,sy-subrc eq 8,sy-subrc eq 12 these all status of ur transport request.
once you done then you need import to Tst Box,use STMS Transaction.
Reward Points if it is useful
Thanks
Seshu -
"How to create new client in ABAP sneek Preview "
HI ,
Can anybody tell me how to create new client in ABAP sneek preview , i had create a new client 100 and tried to enter with Cilent 100. User : SAP* , and Password : pass. But i'm unable to log into the sap system.Hello,
perhaps this will help you --> <a href="http://www.sap-img.com/bc049.htm">instructions</a>
And this quote from another thread:
<i>in SAPNW2004sSneakPreviewABAP this procedure only works if the system <b>profile parameter login/no_automatic_user_sapstar is set to 0</b> (and the system restarted after that), otherwise you will have a new client without any user thus useless ;-).</i>
Regards,
Norman -
Call / make a NACE-Message from an ABAP Program
Hi all,
Does anyone knows how to call / make a NACE-Message from an ABAP Program?
Is there a possibility to call a functionmodul with the needed basic informations (doc. number, sales-org etc.) which will start the NACE Message Procedure?
Reason:
We have make IDOCs for order confirmation, delivery and billing - and make the NACE ALE/EDI Messages.
But we have the problem that we are using Z-Reports for Mass-Printing the documents. So we have no active NACE Messages for printing and we want to send the IDOCs at the moment when we print out the docs.
It's not possible, to change the business procedures and/or using SAP standard mass print prg. because this is too complicated (we think at the moment).
Regards,
DanielHi,
Use this function module.
CHECK xscreen = space.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = syst-msgid
msg_nr = syst-msgno
msg_ty = syst-msgty
msg_v1 = syst-msgv1
msg_v2 = syst-msgv2
msg_v3 = syst-msgv3
msg_v4 = syst-msgv4
EXCEPTIONS
OTHERS = 1.
Regards,
Nisrin.
Maybe you are looking for
-
Country of origin issue to be populated on Goods receipt
We have multiple vendor PART NUMBERS assigned to 1 vendor i.e N - 1 Relationship, if we maintain PIR , which can be used only for 1 vendor to 1 part number we cannot use PIR in this case as it is N - 1 Relation. So, the situation is we need to maint
-
Logon Error for Crystal Report Viewed by User When Not Included In App
I have a Visual Basic 2008 SP1 application and I'm using Crystal Reports 2008 SP0 (with FP1 + 2). I have about 50 reports using integrated security that are all "embeded resources" in the application. When I want to print one of these reports I use
-
Hello, I'm using an ODS object lookup in multiple update rotines, Is there a way to list all the update rules that uses the ODS object. for (e.g) I'm looking up ODS 51 in the update routines for ODS 53 and ODS 56 and also in other update rules, I wan
-
Help with MySQL/PHP Connection
Hi, I'm making a site that requires the storage of information via MySQL. I've set up my testing server, and it connects fine. When I try to add a MySQL connection, however, I keep getting the "HTTP Error Code 404: File Not Found" error. I've trie
-
Hi, today I wanted to buy 10 euro skype credits using eps. My bank said that Skype was unresponsive so I tried it twice more. Now I see Skype processed my order, the money is missing that means my orders were successfully. But now I bought credits fo