Call R3 Transaction language control
Hi all,
I'm calling SAP Transaction from URL that liiks like
http://myportal:50000/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.Transaction?System=PZD_SSO&TCode=su01&GuiType=WinGui
When the lenguage of the browser is EN, SAP GUI opens with english, and when the lenguage of the browser is some other language, the SAP GUI opens with this other language...
Is it possible to control the lenguage in this case?
ForcedRequestLanguage=en doesn't work...
Thanks for help!
Ola
Hi Ola,
You can try with the Customer Exits provider parameter in your transaction iview. This will over-ride browser language and the language defined in the portal for the user.
Search for the pdf How to Start Transaction iViews with a Dynamically Computed Language.
Thanks,
Nikhil
Similar Messages
-
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 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 another transaction in Dialog Programming
Hello ppl,
How can I call another transaction(ZPROGRAM2) from my transaction(ZPROGRAM1) using the delivery and the check box options selected in Screen Programming. Should I use BDC.? Also in case of any errors in ZPROGRAM2, the control should return to ZPROGRAM1 with all the previous setting retained.
Thanks a lot.
KarthikeyanHi ,
You can try with BDC as you need to get the control back to the program1.
If not you can try with the SUBMIT statement.
ex:-
SUBMIT zrslg0000 EXPORTING LIST TO MEMORY
AND RETURN.
Regards,
Satish -
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 -
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 -
Calling a transaction and return
Hi all,
I need to call a transaction from a report and the control has to return back to the report after the called transaction is executed.
The "Call Transaction" statement does not have the option to have the return to the calling program neither do "Leave Transaction".How do I achieve it?
Pls help with your ideas.
Thanks,
StockHi,
I am trying to call the customised copy program of CO99( named new Tcode as ZCO99 with all the values of selection screen passed to memory id and imported in the copy program) through another report.
Now I tried with submit as well and the result is the same.
Another thing is with the Pop-up that we have when the CO99 Tcode is called which is for Controlling Area.Two pop-ups at the start and in between.
Does this prevent from returning to the cliing program.
Thanks,
Stock -
Calling second transaction from a bdc prg
Hi experts
I am using a prog for ISU-Transaction EG33 now my requirement is I have to call another transaction IL02 within this transaction my requirement is just to tick a check box.
Another thing here after executing my current prg ( eg33) function location is created after completion of transction ....the same function location need to be used in my second transaction for which whom i am gonna tick tat check box.(single installation)
thanks in advance
any ideas ???hi,
u can have a look at this code
*& Report ZFIC_BDC_F_43_02_ADJ
REPORT zfic_bdc_f_43_02_adj MESSAGE-ID zfi NO STANDARD PAGE HEADING .
DATA : t_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE,
v_mvar1 LIKE balm-msgv1,
v_mtext(100) TYPE c,
v_tabix(4) TYPE c ,
t_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
----declaration of internal table for uploading the excel file -
DATA: BEGIN OF itab OCCURS 0 ,
bukrs LIKE bkpf-bukrs,
blart LIKE bkpf-blart,
bldat(10) TYPE c ,
budat(10) TYPE c ,
monat LIKE bkpf-monat,
waers LIKE bkpf-waers,
docid LIKE fs006-docid,
newbs LIKE rf05a-newbs,
newko LIKE rf05a-newko,
mwskz LIKE bseg-mwskz,
wrbtr LIKE bseg-wrbtr,
zuonr LIKE bseg-zuonr,
sgtxt LIKE bseg-sgtxt,
zfbdt(10) TYPE c ,
prctr LIKE cobl-prctr,
bukrs1 TYPE bkpf-bukrs,
blart1 TYPE bkpf-blart,
bldat1(10) TYPE c ,
budat1(10) TYPE c ,
monat1 TYPE bkpf-monat,
waers1 TYPE bkpf-waers,
newbs1 LIKE rf05a-newbs,
newko1 LIKE rf05a-newko,
newum LIKE rf05a-newum,
wrbtr1(16) TYPE c,
zuonr1 LIKE bseg-zuonr,
sgtxt1 LIKE bseg-sgtxt,
zfbdt1(10) TYPE c ,
bupla1 LIKE bseg-bupla,
secco1 LIKE bseg-secco,
prctr1 LIKE bseg-prctr,
docid1 LIKE fs006-docid,
wrbtr(16) TYPE c ,
newbs2 LIKE rf05a-newbs ,
newbs3 LIKE rf05a-newbs ,
END OF itab.
DATA: BEGIN OF messtab OCCURS 0 .
INCLUDE STRUCTURE bdcmsgcoll.
DATA: row TYPE i,
key(30),
END OF messtab.
DATA: BEGIN OF messtab2 OCCURS 0,
mtype LIKE bdcmsgcoll-msgtyp,
mtext(100) TYPE c,
row TYPE i,
key(30) TYPE c,
END OF messtab2.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : p_pfile(128) TYPE c OBLIGATORY,
p_pbrow TYPE i OBLIGATORY,
p_perow TYPE i OBLIGATORY,
p_pdis LIKE ctu_params-dismode OBLIGATORY DEFAULT
'A'.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pfile .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_pfile .
START-OF-SELECTION .
----uploading the excel file to internal table -
PERFORM upload_file .
-----filling the bdc table -
PERFORM fill_bdctable .
------writing the error log -
PERFORM write_messtab .
*& Form UPLOAD_FILE
text
--> p1 text
<-- p2 text
FORM upload_file .
CLEAR : t_excel .
REFRESH : t_excel .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_pfile
i_begin_col = '1'
i_begin_row = p_pbrow
i_end_col = '27'
i_end_row = p_perow
TABLES
intern = t_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-002.
ENDIF.
LOOP AT t_excel .
CASE t_excel-col .
WHEN '001'.
itab-bldat = t_excel-value.
WHEN '002'.
itab-budat = t_excel-value.
WHEN '003'.
itab-blart = t_excel-value.
WHEN '004'.
itab-bukrs = t_excel-value.
WHEN '005'.
itab-monat = t_excel-value.
WHEN '006'.
itab-waers = t_excel-value.
WHEN '007'.
itab-docid = t_excel-value.
WHEN '008'.
itab-newbs = t_excel-value.
WHEN '009'.
itab-newko = t_excel-value.
WHEN '010'.
itab-wrbtr = t_excel-value.
WHEN '011'.
itab-bupla1 = itab-bukrs.
itab-secco1 = itab-bukrs.
itab-zfbdt = t_excel-value.
WHEN '012'.
itab-zuonr = t_excel-value.
WHEN '013'.
itab-sgtxt = t_excel-value.
WHEN '014'.
itab-newbs1 = t_excel-value.
WHEN '015'.
itab-newko1 = t_excel-value.
WHEN '016'.
itab-prctr = t_excel-value .
WHEN '017'.
itab-wrbtr = t_excel-value .
WHEN '018'.
itab-bldat1 = t_excel-value.
WHEN '019'.
itab-budat1 = t_excel-value.
WHEN '020'.
itab-blart1 = t_excel-value.
WHEN '021'.
itab-monat1 = t_excel-value.
WHEN '022'.
itab-newbs2 = t_excel-value.
WHEN '023'.
itab-wrbtr1 = t_excel-value.
WHEN '024'.
itab-zuonr1 = t_excel-value.
WHEN '025'.
itab-sgtxt1 = t_excel-value.
WHEN '026'.
itab-newbs3 = t_excel-value.
WHEN '027'.
itab-newum = t_excel-value .
AT END OF row .
APPEND itab.
CLEAR itab .
ENDAT.
ENDCASE .
ENDLOOP.
ENDFORM. " UPLOAD_FILE
*& Form fill_bdctable
text
--> p1 text
<-- p2 text
FORM fill_bdctable .
LOOP AT itab .
v_tabix = sy-tabix .
PERFORM bdc_dynpro USING :
'1' 'SAPMF05A' '0100',
' ' 'BDC_CURSOR' 'FS006-DOCID',
' ' 'BDC_OKCODE' '/00',
' ' 'BKPF-BLDAT' itab-bldat,
' ' 'BKPF-BLART' itab-blart,
' ' 'BKPF-BUKRS' itab-bukrs,
' ' 'BKPF-BUDAT' itab-budat,
' ' 'BKPF-MONAT' itab-monat,
' ' 'BKPF-WAERS' itab-waers,
' ' 'FS006-DOCID' itab-docid,
' ' 'RF05A-NEWBS' itab-newbs,
' ' 'RF05A-NEWKO' itab-newko,
'1' 'SAPMF05A' '0302',
' ' 'BDC_CURSOR' 'RF05A-NEWKO',
' ' 'BDC_OKCODE' '/00',
' ' 'BSEG-WRBTR' itab-wrbtr,
' ' 'BSEG-MWSKZ' ITAB-MWSKZ,
' ' 'BSEG-ZFBDT' itab-zfbdt,
' ' 'BSEG-ZUONR' itab-zuonr,
' ' 'BSEG-SGTXT' itab-sgtxt,
' ' 'RF05A-NEWBS' itab-newbs1,
' ' 'RF05A-NEWKO' itab-newko1,
'1' 'SAPMF05A' '0300',
' ' 'BDC_CURSOR' 'BSEG-WRBTR',
' ' 'BDC_OKCODE' '/00',
' ' 'BSEG-WRBTR' itab-wrbtr,
'1' 'SAPLKACB' '0002',
' ' 'BDC_CURSOR' 'COBL-PRCTR',
' ' 'BDC_OKCODE' '=ENTE',
' ' 'COBL-PRCTR' itab-prctr,
'1' 'SAPMF05A' '0300',
' ' 'BDC_CURSOR' 'BSEG-WRBTR',
' ' 'BDC_OKCODE' '=BS',
' ' 'BSEG-WRBTR' itab-wrbtr,
'1' 'SAPLKACB' '0002',
' ' 'BDC_CURSOR' 'COBL-PRCTR',
' ' 'BDC_OKCODE' '=ENTE',
' ' 'COBL-PRCTR' itab-prctr,
'1' 'SAPMF05A' '0700',
' ' 'BDC_CURSOR' 'RF05A-NEWBS',
' ' 'BDC_OKCODE' '=BU'.
CALL TRANSACTION 'F-43' USING t_bdcdata
MODE p_pdis
UPDATE 'A' MESSAGES INTO messtab.
LOOP AT messtab WHERE msgtyp = 'E' .
v_mvar1 = messtab-msgv1+0(49).
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
language = sy-langu
msg_id = messtab-msgid
msg_no = messtab-msgnr
msg_var1 = v_mvar1
MSG_VAR2 = ' '
MSG_VAR3 = ' '
MSG_VAR4 = ' '
IMPORTING
msg_text = v_mtext
EXCEPTIONS
function_not_completed = 1
message_not_found = 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.
messtab-row = p_pbrow + v_tabix - 1.
messtab-key = itab-newbs.
messtab2-row = messtab-row.
messtab2-key = messtab-key.
messtab2-mtype = messtab-msgtyp.
messtab2-mtext = v_mtext.
APPEND messtab2.
CLEAR messtab.
ENDLOOP.
REFRESH t_bdcdata .
PERFORM bdc_dynpro USING :
'1' 'SAPMF05A' '0100',
' ' 'BDC_CURSOR' 'RF05A-NEWKO',
' ' 'BDC_OKCODE' '/00',
' ' 'BKPF-BLDAT' itab-bldat1,
' ' 'BKPF-BLART' itab-blart1,
' ' 'BKPF-BUKRS' itab-bukrs,
' ' 'BKPF-BUDAT' itab-budat1,
' ' 'BKPF-MONAT' itab-monat1,
' ' 'BKPF-WAERS' itab-waers,
' ' 'FS006-DOCID' itab-docid1,
' ' 'RF05A-NEWBS' itab-newbs2,
' ' 'RF05A-NEWKO' itab-newko,
'1' 'SAPMF05A' '0302',
' ' 'BDC_CURSOR' 'RF05A-NEWUM',
' ' 'BDC_OKCODE' '/00',
' ' 'BSEG-WRBTR' itab-wrbtr1,
' ' 'BSEG-ZFBDT' itab-zfbdt,
' ' 'BSEG-SGTXT' itab-sgtxt1,
' ' 'RF05A-NEWBS' itab-newbs3,
' ' 'RF05A-NEWKO' itab-newko,
' ' 'RF05A-NEWUM' itab-newum,
'1' 'SAPMF05A' '0304',
' ' 'BDC_CURSOR' 'BSEG-PRCTR',
' ' 'BDC_OKCODE' '/00',
' ' 'BSEG-WRBTR' itab-wrbtr1,
' ' 'BSEG-PRCTR' itab-prctr,
' ' 'BSEG-ZUONR' itab-zuonr1,
' ' 'BSEG-SGTXT' itab-sgtxt1,
' ' 'BSEG-BUPLA' itab-bukrs,
' ' 'BSEG-SECCO' itab-bukrs,
'1' 'SAPMF05A' '0304',
' ' 'BDC_CURSOR' 'BSEG-WRBTR',
' ' 'BDC_OKCODE' '=BS',
' ' 'BSEG-WRBTR' itab-wrbtr1,
' ' 'BSEG-BUPLA' itab-bukrs,
' ' 'BSEG-SECCO' itab-bukrs,
' ' 'BSEG-PRCTR' itab-prctr,
' ' 'BSEG-ZUONR' itab-zuonr1,
' ' 'BSEG-SGTXT' itab-sgtxt1,
'1' 'SAPMF05A' '0700',
' ' 'BDC_CURSOR' 'RF05A-NEWBS',
' ' 'BDC_OKCODE' '=BU'.
CALL TRANSACTION 'F-02' USING t_bdcdata
MODE p_pdis
UPDATE 'A' MESSAGES INTO messtab.
APPEND messtab.
REFRESH t_bdcdata .
ENDLOOP .
ENDFORM. " fill_bdctable
*& Form BDC_DYNPRO
text
-->P_0337 text
-->P_0338 text
-->P_0339 text
FORM bdc_dynpro USING flag
var1
var2.
CLEAR t_bdcdata .
IF flag = 1.
t_bdcdata-program = var1.
t_bdcdata-dynpro = var2.
t_bdcdata-dynbegin = 'X'.
ELSE.
t_bdcdata-fnam = var1.
t_bdcdata-fval = var2.
ENDIF.
APPEND t_bdcdata.
ENDFORM. " BDC_DYNPRO -
Calling a transaction code on click on alv
how do i call a transaction on mouse double click on alv grid.
thanks
chinmayaCan u please explain wid reef. to this code thnx
report ztst_chin_alv3.
tables : lfb1.
Declarations *
selection-screen begin of block a with frame title text-001.
select-options : bukrs for lfb1-bukrs.
select-options : lifnr for lfb1-lifnr.
selection-screen end of block a.
data: r_container type ref to cl_gui_custom_container.
data: r_grid type ref to cl_gui_alv_grid.
data: g_fieldcat type lvc_t_fcat.
data: w_fieldcat like line of g_fieldcat.
data: g_layout type lvc_s_layo.
data: ok_code like sy-ucomm.
data: gs_variant type disvariant.
data: t_selected type lvc_t_row.
data wa_selected like line of t_selected.
data: it_items like eban occurs 0.
data: it_sort type lvc_t_sort.
data: s_sort type lvc_s_sort.
data: h_test_alv type lvc_s_col.
data: begin of it_lfb1 occurs 0,
lifnr like lfb1-lifnr,
bukrs like lfb1-bukrs,
akont like lfb1-akont,
fdgrv like lfb1-fdgrv,
end of it_lfb1.
Initialization *
initialization.
at selection-screen.
ok_code = sy-ucomm.
case ok_code.
when 'BACK'.
leave program.
when 'CANCEL'.
leave program.
when 'EXIT'.
leave program.
when 'ONLI' or 'CRET'.
call screen 100.
when others.
endcase.
GetData *
module getdata output.
if sy-ucomm <> 'STOP'.
*refresh control container_1 from screen scr.
refresh it_lfb1.
clear bukrs.
clear lifnr.
select lifnr bukrs akont fdgrv
into corresponding fields of table it_lfb1
from lfb1
where
bukrs in bukrs
and lifnr in lifnr.
endif.
refresh bukrs.
refresh lifnr.
endmodule.
Create ALV *
module create_alv output.
gs_variant-report = sy-repid.
if r_container is initial.
create object r_container
exporting container_name = 'CONTAINER_1'.
create object r_grid
exporting i_parent = r_container.
endif.
*modify the headings in the field catalogue
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'ztest_alv'
changing
ct_fieldcat = g_fieldcat[].
loop at g_fieldcat into w_fieldcat.
case w_fieldcat-fieldname.
when 'ZCURSTAT'.
w_fieldcat-scrtext_l = 'Prev.RelCode'.
w_fieldcat-scrtext_m = 'Prev.RelCode'.
w_fieldcat-scrtext_s = 'Prev.RelCode'.
w_fieldcat-reptext = 'Prev.RelCode'.
endcase.
modify g_fieldcat from w_fieldcat.
endloop.
call method r_grid->set_table_for_first_display
exporting
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
I_CONSISTENCY_CHECK =
i_structure_name = 'ztest_alv'
is_variant = gs_variant
i_save = 'A'
I_DEFAULT = 'X'
is_layout = g_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
changing
it_outtab = it_lfb1[]
it_fieldcatalog = g_fieldcat[]
it_sort = it_sort[]
IT_FILTER =
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 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.
call method r_grid->set_table_for_first_display
exporting i_structure_name = 'ztest_alv'
is_layout = g_layout
is_variant = gs_variant
i_save = 'A'
changing it_outtab = it_lfb1[]
it_fieldcatalog = g_fieldcat[].
*ELSE.
CALL METHOD r_grid->refresh_table_display
EXPORTING i_soft_refresh = ' '.
endmodule.
STATUS *
module status output.
set pf-status '0100'.
endmodule.
User Commands *
module user_command input.
ok_code = sy-ucomm.
case ok_code.
when 'BACK'.
call screen '1000'.
when 'CANCEL'.
leave program.
when 'EXIT'.
leave program.
endcase.
endmodule.
ALV Layout *
module layout output.
g_layout-zebra = 'X'.
g_layout-sel_mode = 'A'.
g_layout-grid_title = ''.
g_layout-detailtitl = ''.
endmodule.
MODULE sort_itab *
module sort_itab output.
*break-point.
*data s_Sort type lvc_s_sort.
perform sort_itab.
endmodule.
FORM sort_itab *
form sort_itab.
s_sort-spos = '1'.
s_sort-fieldname = 'FDGRV'.
s_sort-up = 'X'.
append s_sort to it_sort.
clear s_sort.
endform.
Select Rows *
form get_selected_rows.
call method r_grid->get_selected_rows
importing et_index_rows = t_selected.
if t_selected is initial.
call function 'WS_MSG'
exporting
msg_type = 'E'
text = 'Select Line'
titl = 'Select Line'.
sy-ucomm = 'STOP'.
endif.
endform.
This is Test code.
*class lcl_event_receiver definition.
*public section.
methods:
handle_double_click
for event double_click of cl_gui_alv_grid
importing e_row e_column.
private section.
*endclass.
*class lcl_event_receiver implementation.
method handle_double_click.
**endmethod.
*endclass. -
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 call a transaction (in a new session) from a program
Hi ,
I need to call a transaction from my report on the click of a button in toolbar.
But the transaction should open in a new session.
This is the code that i have written, MM03 is getting opened in the same session.
call transaction 'MM03' and skip first screen.
Hope that my question is clear.
Thanking you in advance..
Shankarcheck this
<b>CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
DESTINATION 'NONE'
EXPORTING
TCODE = 'SM59'
EXCEPTIONS
COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT.
IF SY-SUBRC NE 0.
WRITE: MSG_TEXT.
ELSE.
WRITE: 'O.K.'.
ENDIF.</b>
<b>u can avoid such errors thru this FM
check FI_DUPLICATE_INVOICE_SHOW program for sample code.</b>
regards
Prabhu
Message was edited by: Prabhu Peram -
How to call 2 transactions in a single screen
Hi All,
I need to call 2 Standard transaction in a single screen.
ie: 1 transaction should be displayed in first half of the sceen and another transaction should be in the next half. How we can do this.
Thanks
Partha.Attach two subscren in that screen and call the transactions from the seperate subscreens.
-
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.
Maybe you are looking for
-
Shipment cost documents in automatic purchase order
Does somebody can help me about a shipping problem ? While transferring shipment cost documents to FI-co with automatic generation of purchase order, SAP create one purchase item order for all my shipment cost documents. Is it possible to customize t
-
Hi Can we take more thant one smartforms in one layout type. like i have one layout PINV_LAYOUT . In that layout 2 smartform i added but function module call in programe it is only one for both smartform? so my questiong is that can i add one more sm
-
I downloaded iOS 6 and now my iTouch has gone to ****.
As said, I downloaded iOS 6, and now my apple store crashes constantly, and I can't sync my music. I can't add music either. My dad has a iPhone 4S, and he downloaded it. Everything is fine on his end. Is this just me???
-
Hello friends, I need an example of IMAP using Javamail to retieve new mails from an INBOX .Pls send me an example if u have any .Or suggest me the site where i can get an example on it.
-
Opening iWork documents in windows
Can I open documents created in iWorks on my windows machine at work? Can I print those documents? Thanks, Peter