Calling/showing transactions to a field
Hi,
I have a requirement where i need to show multiple transactions/line items from a table to a field in form like a page, for example
invoice # 101 .. date 01-sep-2009
service abc with delivery
serivce bbc without delivery
service ccc with maximum limit
invoice # 102 date 02-sep-2009
service ddd with delivery
serivce mmm without delivery
service ccc with maximum limit
I hope it is clear to our experts
Thanks
Ahon
Hi!
I hope, i understood right...
Do you want to use a cursor?
Do you just have one multi-line.item or a multi-record-block?
Just a example:
begin
go_item ( 'your_block.item' );
:block.item := null;
for l_rec in ( select i.invoice_Number,
'Invoice # || i.invoice_Number || ' .. ' || to_char ( i.invoice_date, 'dd-mon.yyyy' ) text
from invoice i
where ... your_condition ) loop
if
length ( :block.item || l_rec.text ) + 2 >= 2000
then
message ( 'Data exceds the max-length of 2000 characters' );
message ( ' ' );
return;
end if;
:block.item := :block.item || l_rec.text || chr(10) || chr(10);
for l_rec_detail in ( select ddd, mmm, ccc
from detail
where invoice_number = l_rec.invoice_number ) loop
:block.item := :block.item := 'Service ' || l_rec.detail.ddd || ' with delivery' || chr(10) ||
'Service ' || l_rec.detail.mmm || ' without delivery' || chr(10) ||
'Service ' || l_rec.detail.ccc || ' with maximum limit ' || chr(10);
end loop;
:block.item := :block.item || chr(10) || chr(10);
end loop;
end;Edited by: Magoo on 08.09.2009 14:42
Edited by: Magoo on 08.09.2009 16:40 - try again
Similar Messages
-
Passing multiple values for a single field in URL to call sap Transaction
Hi All,
I need to pass multiple values for a single field to SAP transaction .
means if i have say a field "Date" which can contain more than one value, <b>but its not a range which has two fields</b> . How is it possible.
Let me know pls.
Regards,
Sirisha.R.S.Hi Satyajit,
I need to call a transaction with multiple values which gives me the report based on those values.
So I need to pass multiple values for a single parameter.
I hope u got it.
Regards,
Sirisha.R.S. -
How to Fill the selection screen while calling the transaction
Hi All,
my requirement is in one of the screen while i will press a push button it will call one transaction and it will fill the selection screen build order number field and skip the first screen i.e the selection screen it will show the output of that report directly.
am using this code .
case sy-ucomm.
while 'FSLR'.
set PARAMETER ID 'ANR' FIELD aufnr.
RANGES s_aufnr FOR afko-aufnr.
s_aufnr-sign = 'I'.
s_aufnr-option = 'EQ'.
s_aufnr-low = aufnr.
APPEND s_aufnr.
CALL TRANSACTION 'ZFS1' USING s_aufnr
MODE 'E' .
AND SKIP FIRST SCREEN.
endcase.
here the problem is i cant use both skip screen and using at a time nither the screen is filling nor its skipping the first screen.
but its not working would any one please help how can i do this functionality?Hi
Do in this way.
DATA: rspar TYPE TABLE OF rsparams WITH HEADER LINE.
rspar-selname = 'S_AUFNR'.
rspar-kind = 'S'.
rspar-sign = 'I'.
rspar-option = 'EQ'.
rspar-low = 'aufnr'.
APPEND rspar.
SUBMIT zfs1_prog VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar AND RETURN.
If this doesnt suit yer requirement, I wud suggest you to use BDC as below.
CALL TRANSACTION 'SE11' USING bdcdata
MODE 'E'
UPDATE 'A'. -
Calling a transaction in FM SO_OBJECT_SEND
Hi there,
i want to send an sap mail which contains a call to a transaction.
My problem is, that the parameters to fill the fields of the transaction don't work with parameter names, which have more than 3 characters.
For example:
step 1: creating the email (this works fine and the emails is placed in my inbox)
lf_object_hd_change-file_ext = 'HTM'.
lf_object_hd_change-vmtyp = 'T'.
lf_object_hd_change-acnam = 'REBDBU'. " the transaction to be called
lf_object_hd_change-objsns = 'F'.
lf_object_hd_change-skips = 'X'.
lf_object_hd_change-objla = sy-langu.
lf_object_hd_change-objnam = 'Name of the mail'.
lf_object_hd_change-objdes = 'Subject of the mail'.
lf_object_hd_change-objcp = 'X'.
* Specify the fields of the called transaction
itab_objpara-name = 'BUK'. "THIS WORKS FINE BECAUSE SAP KNOWS THE FIELD BUK
itab_objpara-low = 'P001'.
APPEND itab_objpara.
itab_objpara-name = 'WEH'. "THIS WON'T WORK BECAUSE THE FIELD WEH IS UNKNOWN
itab_objpara-low = '10003'.
APPEND itab_objpara.
step2: changing the layout of my inbox to show the column EXECUTE
step3: double-clicking the execute button calls the transaction REBDBU
step4: the field BUK is correctly filled, but the next field (the business entity) is not filled. the technical docu says that the name of this field is SWENR, but the FM SO_OBJECT_SEND only handles field names with 3 chararcters.. (so i searched and searched and searched and found the 3-char code WEH for the business entity, but this is quite obsolete)
Is there anybody who got a solution?Hi,
first, thanks for your reply. I tried this but this does not solve the problem at all.
The first thing is, that it would be nice to have the mail as executable document. But now i have a mail with an attachment, which must be saved and then executed (both manually).
-> Do you know how to combine the creation of an executable mail with the executable code coming from SWN_CREATE_SHORTCUT?
The second thing is, that the values of the parameters are not transported (the fields are empty after clicking the file on the desktop). But the created file looks fine.
[System]
Name=PX1
Description=
Client=300
[User]
Name=EREDLIN
Language=DE
[Function]
Title=
Command=REBDBU BUKRS=P001;SWENR=10003;SGENR=101;
Type=Transaction
[Configuration]
GuiSize=Normal window -
Error while calling MII transaction as web service from ABAP
Hello Experts,
I want to call a MII transaction from ABAP program, as a web service.
Following is output of http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX (TAG_TRX is name of my transaction).
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
- <!-- Types
-->
- <types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
- <s:complexType name="InputParams">
- <s:sequence id="InputSequence">
<s:element maxOccurs="1" minOccurs="0" name="WEIGHT" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="BATCHID" type="s:string" />
</s:sequence>
</s:complexType>
- <s:element name="XacuteRequest">
- <s:complexType>
- <s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
</s:sequence>
</s:complexType>
</s:element>
- <s:complexType name="Rowset">
- <s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
</s:sequence>
<s:attribute name="Message" type="s:string" />
</s:complexType>
- <s:complexType name="Row">
<s:sequence id="RowSequence" />
</s:complexType>
- <s:element name="XacuteResponse">
- <s:complexType>
- <s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
- <!-- Messages
-->
- <message name="XacuteSoapIn">
<part element="s0:XacuteRequest" name="parameters" />
</message>
- <message name="XacuteSoapOut">
<part element="s0:XacuteResponse" name="parameters" />
</message>
- <!-- Ports
-->
- <portType name="XacuteWSSoap">
- <operation name="Xacute">
<input message="s0:XacuteSoapIn" />
<output message="s0:XacuteSoapOut" />
</operation>
</portType>
- <!-- Bindings
-->
- <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="Xacute">
<soap:operation soapAction="http://www.sap.com/xMII" style="document" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <!-- Service mapping
-->
- <service name="XacuteWS">
- <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
<soap:address location="http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX" />
</port>
</service>
</definitions>
Now, when I am using http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX to create a Enterprise Service in SAP (i.e. SE80 transaction-> Create Enterprise Service-> Service Consumer-> URL/HTTP Destination-> URL ... I am getting following error.
Incorrect value: Entity "<<document>>"(5 /93 ). unexpected symbol: '<'
But, whenever I am using the same URL in MII BLS, it does not give any error. It correctly shows all input and output parameters.
Please help me to resolve this issue.
Regards
Neeta.Now, I am able to create the Web Service in SAP and it is now showing the respective class, attribute and methods to execute this web service (web service to call MII transaction).
But when I am calling it from ABAP (a simple Web Dynpro for ABAP method), it is showing me the following error:
Error (id=GET_BUSINESS_SYSTEM_ERROR): An error occurred when determining the business system (LD_ERROR)
Thought this error is coming from ABAP program, but I am sure that this is related to some configuration at SAP level. (Let me inform you that there are two different servers for SAP Web Dynpro ABAP and SAP MII.
Please help.
Thanks in advance. -
Show value in "customer" field of FAGLB03
Hi Experts,
we have a requirement to Show value in "customer" field of FAGLB03 for all sales related transactions.
Your support is appreciated.
Thankssolution has been implemented using badi FAGL_ITEMS_CH_DATA
-
Calling a transaction and skipping the first screen
Dear forumers,
In my report program, I will need to call a custom transaction with skipping the first screen.
And, this custom transaction is created from a query.
Currently, the codes look like below:-
SET PARAMETER ID: 'BUK' FIELD w_output-bukrs,
'AN1' FIELD w_output-anln1.
CALL TRANSACTION 'ZCUSTQ' AND SKIP FIRST SCREEN.
Everything works perfectly alright except for one thing: The first screen is not skipped. When the custom transaction is called, the first screen is still displayed to the user.
Additionally, I also found out that the "SKIP FIRST SCREEN" does not work because the screen's next screen number is the same. This means the screen 1000's next screen is 1000 as well.
(See notes in italics below)
Does anyone have any ideas on how to resolve this? Please help.
This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.For Any Query , if you want to create the Transaction you need to use the Tcode START_REPORT
in general it will skip the first Transaction codes selection screen , Not your query reports selection screen.
I checked and verfied...
Steps to verify the issue..
1.Go to SE93 ,Now you will go for parametric transaction.
2. give the Transaction as START_REPORT, there you will have option Skip Initial Screen. You uncheck that.
3. Now give all information related to your query.
and see the effect
call TRANSACTION 'YYTCODE AND SKIP FIRST SCREEN.
This will always trying to skip the First transaction's selection/initial screen , Not your Query selection screen.
You also try to check and let me know. -
Can we call a transaction from a report
hi
can we call a transaction from a reporthi,
we can call
check it
*& Report ZSALESORDERDETAILS_ASHOK
REPORT ZSALESORDERDETAILS_ASHOK
NO STANDARD PAGE HEADING
LINE-SIZE 50
LINE-COUNT 35(5).
*data declaration.
tables :vbak.
tables: VBAP.
DATA : TVBAK LIKE VBAK OCCURS 0 WITH HEADER LINE,
TVBAP LIKE VBAP OCCURS 0 WITH HEADER LINE,
TEMP TYPE p decimals 5 VALUE '0.0' ,
A type i,
FIELDNAME TYPE STRING,
FIELDVALUE TYPE VBAP-VBELN.
DATA G_CB.
selection-screen begin of block screen1 with frame title TEXT-001.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT /32(35) COMM1.
SELECTION-SCREEN ULINE /27(35).
SELECTION-SCREEN SKIP.
SELECT-OPTIONS TVBELN FOR VBAK-VBELN.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN COMMENT /30(50) COMM2.
SELECTION-SCREEN ULINE /27(40).
SELECTION-SCREEN SKIP.
SELECT-OPTIONS TERDAT FOR VBAK-ERDAT.
SELECTION-SCREEN SKIP.
selection-screen end of block screen1.
*Initialization
Initialization .
TVBELN-low = 4000.
TVBELN-high = 5000.
TVBELN-option = 'BT'.
TVBELN-sign = 'I'.
APPEND TVBELN.
TERDAT-low = '19960202'.
TERDAT-high = '20020302' .
APPEND TERDAT.
AT SELECTION-SCREEN .
SELECT *
FROM VBAK
INTO TABLE TVBAK
WHERE VBELN IN TVBELN AND erdat IN Terdat .
IF sy-subrc ne 0.
MESSAGE 'ENTERED ORDER NOT FOUND' type 'E'.
ENDIF.
START-OF-SELECTION.
REFRESH TVBAK.
SELECT *
FROM VBAK
INTO TABLE TVBAK
WHERE VBELN IN TVBELN AND ERDAT IN TERDAT.
END-OF-SELECTION.
LOOP AT TVBAK.
WRITE: /2 SY-VLINE,
TVBAK-VBELN INPUT ON ,
15 SY-VLINE,TVBAK-ERDAT hotspot on,
30 SY-VLINE, 35 TVBAK-ERNAM,
46 SY-VLINE,
g_cb AS CHECKBOX.
ENDLOOP.
A = SY-LINCT - SY-LINNO - 1.
SKIP A .
RESERVE A LINES.
AT SELECTION-SCREEN OUTPUT.
comm1 ='SELECT SALES ORDER RANGE'.
comm2 ='SELECT SALES ORDER CREATION DATE'.
TOP-OF-PAGE.
ULINE.
WRITE /15 ' SALES ORDER REPORT ' COLOR = 1 .
ULINE.
WRITE : /7 ' VBELN ' COLOR = 5 ,
19 ' ERDAT ' COLOR = 5,
34 ' ERNAM ' COLOR = 5.
ULINE.
END-OF-PAGE.
IF SY-LSIND = 0.
ULINE.
WRITE : /2 'NUMBER OF LINE IN THIS PAGE = ', SY-LINNO.
SKIP.
WRITE: /30 'PAGE NUMBER = ', SY-PAGNO.
ULINE.
ELSEIF SY-LSIND = 1.
ULINE.
WRITE : /12 'TOTAL PRICE = ' ,TEMP.
CLEAR TEMP.
SKIP.
WRITE : /30 'PAGE NUMBER = ', SY-PAGNO.
ULINE.
ENDIF.
at line-selection.
GET CURSOR FIELD FIELDNAME VALUE FIELDVALUE.
IF FIELDNAME = 'TVBAK-VBELN'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = FIELDVALUE
IMPORTING
OUTPUT = FIELDVALUE.
WINDOW STARTING AT 60 2 ENDING AT 120 25.
IF SY-LSIND = 1.
SELECT
FROM VBAP
INTO TABLE TVBAP
WHERE VBELN EQ FIELDVALUE.
LOOP AT TVBAP.
TEMP = TEMP + TVBAP-NETPR.
WRITE : /2 SY-VLINE, TVBAP-matnr,
17 SY-VLINE,TVBAP-VBELN,
30 SY-VLINE,TVBAP-NETPR currency 'IN',
49 SY-VLINE.
ENDLOOP.
ULINE.
A = SY-LINCT - SY-LINNO - 1.
SKIP A .
RESERVE A LINES.
ENDIF.
<b>ELSEIF SY-LSIND = 2.
call transaction 'MM01' .
ENDIF.</b>
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE : / SY-ULINE,
/7 ' DETAIL OF GIVEN SALES ORDER ' COLOR = 5,
/ SY-ULINE,
/4 'MATNR',
22 'VBELN',
35 'NETPR',
/ SY-ULINE.
Regards
ASHOK
Message was edited by:
ASHOK KUMAR -
How to call a transaction with a variant
Hi all
I created a bdc program after updating it should call another transaction with predefined variant that that transaction program is of type module pool.
can anyone tell me the syntax how to call a transaction with a variant.Hi
goto Tcode SHD0
enter the Tcode for which Tran Variant has to be created(dialog Tcode)
enter Trans variant to be created
press create button
it will go through all the screens of that Tcode and save
and modify the fields as per requirement
we can create Transaction Variants Using SHD0 Transaction.
Transaction Variants and Screen Variants
Transaction variants can simplify transaction runs as they allow you to:
Preassign values to fields
Hide and change the 'ready for input' status of fields
Hide and change table control column attributes
Hide menu functions
Hide entire screens
In particular, hiding fields in connection with screen compression, and hiding screens, can result in greater clarity and simplicity.
Transaction variants are made up of a sequence of screen variants. The field values and field attributes for the individual screens found in transaction variants are stored in screen variants. Each of these variants is assigned to a specific transaction, can, however, also contain values for screens in other transactions if this is required by transaction flow. The transaction that the variant is assigned to serves as initial transaction when the variant is called.
There are both client-specific and cross-client transaction variants. All screen variants are cross-client, but may be assigned to a client-specific transaction variant.
A namespace exists for cross-client transaction variants and screen variants and both are automatically attached to the Transport Organizer. Client-specific transaction variants must be transported manually.
In principle, transaction and screen variants can be created for all dialog and reporting transactions. There are, however, certain Restrictions that apply to certain transactions, depending on their internal structure.
No transaction variants are possible with transactions already containing preset parameters (parameter transactions and variant transactions).
Regards
Anji -
Calling a transaction in webdynpro
Hi,
As per my requirement when a button click happens I need to call the transaction CAT2 by skipping initial screen. How to achieve this in webdynpro.
Thanks
RaghavendraHi Raghavendra,
If you are using portal as a triggerring point of your web dynpro applications, then the below requirement is achieved by doing the following.
1. Create a BDC report program to call transaction CAT2 skipping the first screen.
2. The report has the same input parameters as that of the transaction CAT2.
3. Associate a transaction to the report program sat 'ZCAT2'.
In the event handler of the button in your web dynpro do that following
Data declarations
Local Internal tables(lt_)
lt_bus_parameter_list TYPE wdy_key_value_table,
lt_launcher_parameter_list TYPE wdy_key_value_table,
Local Work area's(ls_)
ls_keyvalue_pair TYPE wdy_key_value,
Local Variables(l_)
l_pcdpageurl TYPE string,
l_componentcontroller TYPE REF TO if_wd_component,
l_port_manager TYPE REF TO if_wd_portal_integration.
Constants(c_)
CONSTANTS:
c_transaction_code TYPE string VALUE 'ZCAT2',
c_okcode TYPE string VALUE 'F8',
c_param1 TYPE string VALUE 'P_Data_Entry_Profile',
c_param2 TYPE string VALUE 'P_person_number'.
l_componentcontroller = wd_this->wd_get_api( ).
l_port_manager = l_componentcontroller->get_portal_manager( ).
Fill all the business parameters
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = c_param1.
ls_keyvalue_pair-value = 'Data Entry Profile'.
APPEND ls_keyvalue_pair TO lt_bus_parameter_list .
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = c_param2.
ls_keyvalue_pair-value = 'Person Number'.
APPEND ls_keyvalue_pair TO lt_bus_parameter_list .
Fill the launcher parameters for the transaction
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'AutoStart'.
ls_keyvalue_pair-value = 'Yes'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'GuiType'.
ls_keyvalue_pair-value = 'WinGui'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'OkCode'.
ls_keyvalue_pair-value = c_okcode.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'System'.
ls_keyvalue_pair-value = 'SAP_R3_HumanResources'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'TCode'.
ls_keyvalue_pair-value = c_transaction_code.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'Technique'.
ls_keyvalue_pair-value = 'SSF'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'WinGui_Type'.
ls_keyvalue_pair-value = 'Shortcut'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
SAP has provided us with customizing table to maintain the path for the iView.Here Resource_key is the key field to get the path.
We create a new entry in this table using which we uniquely identify the path of the iVew that needs to be launched.
get the url of the pcd page for the common transaction iView
SELECT SINGLE b~text
INTO l_pcdpageurl
FROM t7xssserstring AS b
INNER JOIN t7xssserres AS a
ON arespcdpage = bguid
WHERE a~ressource = /rio/zcl_hse_constants=>c_common_resource.
Navigate to the Injury Illness details
CALL METHOD l_port_manager->navigate_absolute
EXPORTING
navigation_target = l_pcdpageurl
navigation_mode = l_port_manager->co_show_external
use_sap_launcher = abap_true
business_parameters = lt_bus_parameter_list
launcher_parameters = lt_launcher_parameter_list.
The folowing is the flow of the program:
When user clicks a button to launch transaction CAT2, the event handler associated to it called.
Here we populate an internal table with the parameters to call transaction ZCAT2 and the iView is launched by calling navigate_absolute method with the right path.
I am not very much sure as to how the iViews are set up but there is a provision to read the key valure pair there. The values are read and the tranzation ZCAT2 is called which will inturn launch CAT2 transaction.
By adding Skip First screen statement we can get in the details directly.
Hope this helps.
Regards,
Sravan Varagani -
Calling sap transaction in html
hi all
i've created an iview which is calling sap transaction while creaating it has given me some options like sap gui for windows,sap gui for html.while selecting sap gui for html i am getting some error.other is working. can any one plzz tell me how to create a iview which calls saptransction using sap gui for html template.
awaiting for repliesHi,
In order to show your Iview in sap gui for html, you need to have ITS server configured.
1. If you are using SAP version <= 4.7 on web as 6.20 then you need to install ITS 6.20.
2. If you are using SAP version >= 4.7 on WEBAS 6.40, then ITS comes as integrated ITS 6.40. So you can activate the Integrated ITS.
If you want to use SAP GUI for java then you need little configuration which is explained in my weblog.
Steps for quick installation and usage of SAP GUI for JAVA in EP
Hope this helps,
Thanks,
Praveen.
PS.Dont forget to reward points. -
Calling SAP Transaction from BSP
I wonder whether it is possible to call SAP transaction from BSP application and pass to it some data; e.g., PO# when calling VA02?
The called transaction could appear in a separate MS IE Window (like in some Portal applications) or in SAP GUI.
Any help will be appreciated.
Thank you in advanceI have launched the Java SAPGui from BSP pages before. I used SNC so that the users were logged on via Single Sign On. I store the Java Gui in the Mime directory. You can force the startup transaction. Theorectically you could also Gui Scripting to try and control the Gui and force in the default value for your PO field. I have not tried that however. You will probably want to check the Service Marketplace for documents on the Gui Scripting. The following is the code from my BSP page to launch the Java Gui in the Browser as an applet:
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<HTML>
<HEAD>
<TITLE>SAPGUI for the Java Environment</TITLE>
<STYLE type="text/css">
body { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; }
</STYLE>
</HEAD>
<BODY scroll="no">
<SCRIPT language="JavaScript">
// user configurable part starts here
var pluginurl = '';
var scriptable = 'true';
var codebase = '.';
var jnlp = 'platin.jnlp';
var keepalive = 'true';
var frog = 'true';
var trace = '';
var tracefile = '';
var connectionData = 'conn=/M/nts163/S/3620/G/SPACE/&tran=SE80&clnt=088&fast=true&sncon=true&sncname=p:[email protected]&sncqop=9';
// user configurable part ends here
// verify if Java Plugin as control in Internet Explorer or Java Plugin for Netscape or native JRE of browser must be used
var jre = 'control';
if(navigator.platform.indexOf("Mac") > -1)
jre = 'native';
else if (navigator.appName.indexOf("Netscape") != -1)
jre = 'plugin';
document.open();
switch (jre)
case 'control':
document.writeln('<OBJECT CLASSID = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ');
document.writeln(' ID = "PlatinGUI" ');
document.writeln(' CODEBASE = "j2re-1_3_1_02-win-i.exe#Version=1,3,1,0" ');
document.writeln(' WIDTH = "100%" ');
document.writeln(' HEIGHT = "100%" ');
document.writeln(' BORDER = 0> ');
document.writeln('<PARAM NAME = "TYPE" VALUE = "application/x-java-applet;jpi-version=1.3.1"> ');
document.writeln('<PARAM NAME = "SCRIPTABLE" VALUE = "', scriptable,'"> ');
document.writeln('<PARAM NAME = "code" VALUE = "com.sap.platin.GuiApplet2"> ');
document.writeln('<PARAM NAME = "codebase" VALUE = "', codebase,'"> ');
document.writeln('<PARAM NAME = "jnlp" VALUE = "', jnlp,'"> ');
document.writeln('<PARAM NAME = "archive" VALUE = "GuiStartS.jar"> ');
document.writeln('<PARAM NAME = "keepalive" VALUE = "', keepalive,'"> ');
document.writeln('<PARAM NAME = "frog" VALUE = "', frog,'"> ');
document.writeln('<PARAM NAME = "trace" VALUE = "', trace,'"> ');
document.writeln('<PARAM NAME = "tracefile" VALUE = "', tracefile,'"> ');
document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData,'"> ');
document.writeln(' ');
document.writeln('This page requires a Sun Java Plugin 1.3 and a SAPGUI for Java to view. ');
document.writeln(' ');
document.writeln('</OBJECT> ');
break;
case 'plugin':
document.writeln('<EMBED TYPE = "application/x-java-applet;version=1.3" ');
document.writeln(' PLUGINURL = "', pluginurl,'" ');
document.writeln(' WIDTH = "100%" ');
document.writeln(' HEIGHT = "100%" ');
document.writeln(' ALIGN = "BASELINE" ');
document.writeln(' code = "com.sap.platin.GuiApplet2" ');
document.writeln(' codebase = "', codebase,'" ');
document.writeln(' jnlp = "', jnlp,'" ');
document.writeln(' archive = "GuiStartS.jar" ');
document.writeln(' keepalive = "', keepalive,'" ');
document.writeln(' frog = "', frog,'" ');
document.writeln(' trace = "', trace,'" ');
document.writeln(' tracefile = "', tracefile,'" ');
document.writeln(' connectionData = "', connectionData,'" ');
document.writeln(' <NOEMBED> ');
document.writeln(' </NOEMBED> ');
document.writeln(' </EMBED> ');
break;
case 'native':
document.writeln('<APPLET CODEBASE = "', codebase,'" ');
document.writeln(' ARCHIVE = "GuiStartS.jar" ');
document.writeln(' CODE = "com.sap.platin.GuiApplet2" ');
document.writeln(' WIDTH = "100%" ');
document.writeln(' HEIGHT = "100%"> ');
document.writeln('<PARAM NAME = "SCRIPTABLE" VALUE = "', scriptable, '"> ');
document.writeln('<PARAM NAME = "jnlp" VALUE = "', jnlp, '"> ');
document.writeln('<PARAM NAME = "keepalive" VALUE = "', keepalive, '"> ');
document.writeln('<PARAM NAME = "frog" VALUE = "', frog, '"> ');
document.writeln('<PARAM NAME = "trace" VALUE = "', trace, '"> ');
document.writeln('<PARAM NAME = "tracefile" VALUE = "', tracefile, '"> ');
document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData, '"> ');
document.writeln('</APPLET> ');
break;
document.close();
</SCRIPT>
</BODY>
</HTML> -
How to call a transaction from ABAP code
Hi everybody,
How do I run a transaction from my ABAP code?
For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
Thanks for the help,
RoyCALL TRANSACTION
Syntax
CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
| [USING bdc_tab [bdc_options]] }.
Extras:
1. ... AND SKIP FIRST SCREEN
2. ... USING bdc_tab [bdc_options]
Effect
The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
Note
At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
Addition 1
... AND SKIP FIRST SCREEN
Effect
This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
Example
If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
DATA: carrid TYPE spfli-carrid,
connid TYPE spfli-connid.
SET PARAMETER ID: 'CAR' FIELD carrid,
'CON' FIELD connid.
CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
Addition 2
... USING bdc_tab [bdc_options]
Effect
Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
Component Description
PROGRAM Name of the program of the called transaction
DYNPRO Number of the dynpro to be processed
DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
FVAL Value to be passed to the dynpro field or to the control statement
Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
System Fields
sy-subrc Description
0 The batch input processing of the called transaction was successful.
< 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
1001 Error in batch input processing.
Note
Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
Example
Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLSEOD'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
bdcdata_wa-fval = class_name.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=CIDI'.
APPEND bdcdata_wa TO bdcdata_tab.
opt-dismode = 'E'.
opt-defsize = 'X'.
CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt. -
Calling a transaction( whose o/p is an ALV) with a specific layout
We have a requirement where we need to call a transaction (VL10C) whose output is an ALV.
I have used a SUBMIT PROGRAM(since it is report trans). Now we need to set the layout of the ALV also.
Any help would be appreciated.Hi,
first, thanks for your reply. I tried this but this does not solve the problem at all.
The first thing is, that it would be nice to have the mail as executable document. But now i have a mail with an attachment, which must be saved and then executed (both manually).
-> Do you know how to combine the creation of an executable mail with the executable code coming from SWN_CREATE_SHORTCUT?
The second thing is, that the values of the parameters are not transported (the fields are empty after clicking the file on the desktop). But the created file looks fine.
[System]
Name=PX1
Description=
Client=300
[User]
Name=EREDLIN
Language=DE
[Function]
Title=
Command=REBDBU BUKRS=P001;SWENR=10003;SGENR=101;
Type=Transaction
[Configuration]
GuiSize=Normal window -
Dear Expert,
Is that possible to call a transaction code using a webdynpro for abap. I have a button in my program where when i click on the button, it need to all up the su01 screen.
My coding is as below
method ONACTIONEDIT_APPRAISAL .
LEAVE TO TRANSACTION 'SU01'.
endmethod.
However when i run this program, and click ont he button, the system return a short dump.
Any idea?
Thanks,
Regards,
BryanDear Suman or anyone,
I have solve this using the navigate_absolute method, however the NAVIGATION_MODE seem that does not works.
Code begin*
method ONACTIONEDIT_APPRAISAL .
data lr_componentcontroller type ref to ig_componentcontroller .
data l_api_componentcontroller type ref to if_wd_component.
data lr_port_manager type ref to if_wd_portal_integration.
lr_componentcontroller = wd_this->get_componentcontroller_ctr( ).
l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).
lr_port_manager = l_api_componentcontroller->get_portal_manager( ).
Data:
target type string.
Data:
nmode type string.
target = 'pcd:portal_content/mysap/Appraisal/PPPM_PAGE'.
nmode = 'INPLACE'.
call method lr_port_manager->navigate_absolute
exporting
NAVIGATION_MODE = nmode
navigation_target = target
endmethod.
*code end
I have tried to use the INPLACE navigation mode, but it still display it in a new portal page. Anyway to control it? Do i need to define a area so that the target will show in that particular area?
Please help me...
Thanks
Regards,
Bryan
Maybe you are looking for
-
Dear All. As there is one function module BWSO_DATE_GET_FIRST_WEEKDAY which returns the first day of the week but its Monday but in our case we require Saturday and in some cases Monday. our user in UK are running the same report in which i have to c
-
Color coding events within a single calendar
I need to color code different types of definable events within a single calendar, a feature I have with my old Now Up to Date calendar, but I'm trying to switch over to the Apple calendar. I understand different calendars will themselves show up a
-
FM FOR AUTOINCREMENTATION OF PK
HI to all, I ve a requirement to fetch data from the DB Table and want to increment it in the screen. So that when i m opening it for the next time it will show me the next value where to insert the data.
-
Is it possible to update master data attributes from an ODS?
HELLO ALL, we have records coming into our ods like the following: costcenter1, subcostcentera, subcostcenterb, manager responsible, costs (kf). This is a custom flat file load from a legacy system. We would like to just create an update rule from t
-
Hla. Mi problema es con la papelera de reciclaje. No consigo vaciarla. Eliminé un archivo de un disco externo y ahora no me deja ni sacarlo de la papelera ni vaciarla. Aparecen nesajes de error -36. Si añado otras carpetas tampoco consigo eliminarlas