Pass parameters from abap to MS word
Hello everyone ,
I have a requirement wherein i have to pass some parameters from abap to MS word template. Now this MS word template is designed by the user and in this template there are some fields whose input will be passed from the abap.
For e.g :
MS WordTemplate has sales order no. which needs to be imported from abap , meaning in abap selection screen i enter sales order and after executing the report, user made MSword template opens and in certain position that sales order is printed.
I tried to find some threads but couldn't get the appropriate ones. Also found OLE formatters but not helpful.
Please advice.
Thanks in advace.
THis may be late but after you Open the word doc make document active, get fields object, get field count. Loop through for the number of fields and get the field name when the name is what you want to set use result property (which is the value). I got alot from fm DSVAS_MSWORD_READ_FIELDS1. I can read values greater than 245 into a string but am unable to set a result greater than 256 characters. That's why I was looking and ran across your post from January.
Active Doc
call method of lo_application 'ActiveDocument' = lo_activedocument.
if sy-subrc <> 0.
perform error using 'Method ActiveDocument'.
endif.
Fields
call method of lo_activedocument 'FormFields' = lo_fields.
if sy-subrc <> 0.
perform error using 'Method FormFields'.
endif.
Get number of fields in document
get property of lo_fields 'count' = lf_fcount.
if sy-subrc <> 0.
perform error using 'Get Property Count'.
endif.
for each field get the Name and set values
do lf_fcount times.
call method of lo_fields 'Item' = lo_myfld
exporting
#1 = sy-index.
if sy-subrc <> 0.
perform error using 'Method Item'.
endif.
get property of lo_myfld 'Name' = lf_fname.
if sy-subrc <> 0.
perform error using 'Get Property Name'.
endif.
case lf_fname.
when 'QMNUM'.
set property of lo_myfld 'Result' = viqmel-qmnum.
if sy-subrc ne 0.
perform error using 'Set Property Result = QMNUM'.
endif.
when 'MATKTX'.
set property of lo_myfld 'Result' = riwo03-matktx.
if sy-subrc ne 0.
perform error using 'Set Property Result = MATKTX'.
endif.
when 'MATNR'.
set property of lo_myfld 'Result' = viqmel-matnr.
if sy-subrc ne 0.
perform error using 'Set Property Result = MATNR'.
endif.
when 'QMTXT'.
set property of lo_myfld 'Result' = g_string. " viqmel-qmtxt.
if sy-subrc ne 0.
perform error using 'Set Property Result = QMTXT'.
endif.
exit. "no more fields to update
endcase.
enddo.
Similar Messages
-
Parameters from abap web dynpro to visual composer
Hello ,
Can we pass output parameters from abap web dynpro to visual composer?
<i><u>For Example:</u></i>
ID NUMBER that we got in the application (Abap web...)
and we want to pass it to import parameter of visual composer (start-point)
I know about the mapping(in GP) but how we can see the output parameter of the abap web dynpro in GP-callable object(output parameters).
When we use GP (callable object), we have input/output parameters.
I need to map from abap web dynpro <b>(output)</b> to visual composer <b>(input)</b>
Thank You,
Boaz.Hi Boaz,
Unfortunately it's one of the GP restrictions that it's not possible to transport parameter values from an ABAP web dynpro UI into the GP context. Vice versa is feasible, i.e. you can use an ABAP web dynpro UI and fill it with parameter values from GP context.
Regards,
Jan -
Pass parameters from JSP Dyn Page to WDJ Application
Hi,
I am trying to pass parameters from my JSPDyn Page to WDJ Application.
I am using NWDS 7.1 EHP1
My code is :
function to_WEBDYNHK()
EPCM.relaxDocumentDomain();
EPCM.doNavigate
('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');
This method is being called on click of a button.
hkparam is the parameter in question.
The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.
In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.
However I am getting null as the value of hkparam in my WDJ application.
The code used is :
IWDRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
String param1= request.getParameter("hkparam");
What seems to be missing here.
Please help.
I went through the documentation on SDN but it does not seem to help.
TIA,
HimanshuHi Himanshu,
Try this code.
EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")
if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.
Regards,
Vishweshwara P.K.M. -
How can I pass parameters from one process flow to another process flow?
How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
Thanks in advance,
KishanHi Kishan,
Please post this question to the Warehouse Builder forum:
Warehouse Builder
Thanks, Mark -
Passing Parameters from One Screen to Another Screen
Hi All,
I need to Pass Parameters from one Module Pool Screen to Another Screen.
I have two Parameters in First screen. I don't want to use <b>Export and Import</b>
The first screen record should sit in the Second Screen as it is.
Please suggest me.
Thanks and Regards,
Prabhakar DharmalaAn Idea,
Create a function group, in that define global variables. Then create two function module. Pass variable from one function module and get in the another one.
Hope this will help you to solve. If you need further help I will create and sent you a test code.
Darshan.
<i><b>Pl. Reward points to the helpful answer, it motivates us to answer more </b></i> -
Passing parameters from a browser URL to Flash
Flash CS3, AS3
Is there any way to pass parameters from the URL line in a
web browser to actionscript?
ie. so if you had something like the following URL link in
the browser...
http://www.somedomain.com/someswf.swf?var1=10&var2=false
...it would pass var1 and var2 to someswf.swf.
(Hypothetically, of course - I'm unsure as to the necessary syntax)
Is this possible? Or would I need some intermediary software?
Thanks
Ricki answered a very similar forum query a few days ago
here
You need to look into loaderInfo.parameters. -
Passing parameters from an URL to a WAD Web Template 7.0
Hi guys, I need to pass parameters from an URL to a web template created with WAD 7.0. We need to open a template with certain filters starting from a link button located on an Xcelsius Dashboard. Our customer wants a web template to be opened with the filters defined within the Xcelsius
The idea is to run the template with the filters defined in the URL. I know this was incredibly easy with WAD 3.x, but I didn't find any suitable solutions to use with WAD 7.0.
What is the easiest way to do this with WAD 7.0?
Thanks in advance and regards.
Fabio CristiHi,
It is possible in 7.0, but unfortunately it is a lot more complicated than i 3.x. There are quite a few examples here:
http://help.sap.com/saphelp_nw70/helpdata/en/43/ef05462480025ae10000000a1553f7/content.htm
I used it in a case where I wanted to embed a Web template in a BPS application and pass characteristic filters from the BPS application to the web template - similar to your requirements. Basically you need the following just to restrict one characteristic :o(
&BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE
&BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1
&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STRING
&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=PDS06
&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0D_PH2
I could only get it to work with one characteristic and I suspect, that the reason is that the URL simply gets to long (very quickly). You have to repeat the above for every characterstic you want to use :o(
Hth,
Jacob -
Automatically Pass Parameters From Crystal To SAP B1
So, I've searched extensively, and haven't been able to find an answer to my unique issue.
This question pertains to linking a Crystal Report by parameter values to the OWOR table in SAP B1, and automatically passing those parameter values from the active record in SAP. Several other tables are used in sql joins, but the report is generated from an OWOR production order. I should start by stating that the report works great when manually populating the parameter fields when SAP calls for them.
Overview:
I've written a report in Crystal that contains several sub reports, some of which are looking to the DocEntry field as the parameter (DocKey@) and others that do not look to the DocEntry field at all - but rather use another field on the form to pull up information that spans more than just that one production order. I've chosen to upload as a layout in SAP (as that is all I've worked with up to this point, and it seems it needs to be to automate from a production order); but as I continue to research, it appears DocKey@ is mandatory when uploading as a layout, and in order to view the report from the actively selected production order, it must be a layout. Does that mean the parameter is required in all sub reports? Is it required in any sub report?
I have two main issues that I need to hurdle for this report to work how I would like it to:
1. Three of the eight Commands (one main command and seven sub-report commands) use the DocKey@ as the parameter to pass from SAP back to Crystal. The main report command, as well as four of the sub reports/commands are looking to another field in the OWOR record - which happens to be a re-seller defined field (UDF). For all intensive purposes, let's call this field BatchID. I'm assuming the sub report commands run in succession, one after the next. The reason I need to use BatchID as the parameter to pull from the record, rather than DocEntry, is there are other records that contain the same BatchID, and I want all of the info pertaining to that BatchID to populate on the report.
Q1: The first command containing DocKey@ is automatically populated by SAP, and the user does not have to key that one in. However, the next two DocKey@ parameters do not automatically populate, and the user is asked for those values. How can I fix this?
Q2: How can I automate the passing of BatchID so the user does not have to fill it in 5 times when they wish to preview the report(layout)? Can I link ObjectID@ to any field in OWOR? Is there any other way like creating a stored procedure or something , to automate the passing of that variable from the SAP active record to the crystal report - so the user doesn't have to key it in several times just to pull up the report?
Thank you so much for even reading, let alone helping me with this issue!!
Cheers,
NickHi
I had the same problem. Take a look at this newsgroup article on the businessobjects
website :
http://support.businessobjects.com/library/kbase/articles/c2015264.asp
Grieg
"Rada Pickens" <[email protected]> wrote:
>
>Hi,
>
>I'm getting the same error message, I was wondering if you fixed the
>problem.
> I'm stumped, can you help?
>
>Rada
>
>
>"JAI" <[email protected]> wrote:
>>
>>I am passing parameters, from the JSP page to Crystal Report, i took
>>the code from
>>the below mentioned url, i dont know, it is something wrong with the
>>jsp page
>>or crystal report.
>>i have created parameter field in crystal report to receive the value
>>from the
>>jsp page.
>>If u r not clear with the error, please reply to me.
>>
>>i took the code from the below mentioned page
>>
>>reference page:
>>----------------------
>>http://dev2dev.bea.com/trainingevents/webinars/012804_faq.jsp
>>parameterFieldsViewReport.jsp
>>
>>
>>error displaying in the jsp page
>>-----------------------------------
>>com.crystaldecisions.report.web.viewer.CrystalReportViewer
>>Some parameters are missing values
>
-
Passing parameters from shell script to OWB process flow
Hi all,
I am running OWB process flow (using the template script provided by oracle) and i want to pass two date parameters as shown below:
sqlplus -s $SQL_USER/$SQL_PWD@$ORACLE_SID @$HOME_DIR/src/vmc_oem_exec_script.sql OWB_OWNER VMC_POST_DW_PF_LOC_SIT PROCESS VMC_NM1_PORT_MAIN "," "P_DATE_FROM=$DATE_FROM,P_DATE_TO=$DATE_TO"
How do i catch those values in process flow and pass those to mappings in Process flow?
Do i need to create PF variables with same names or any name will do?
Thanks in advanceThis document is explaining how to pass data between activities in process flow.
I am passing parameters from a shell script.
Any ideas,how to pass parameters from shell script and then initialize the process flow variables based on those values and then pass them further to mappings.
Thanks -
Hi,
I want to pass parameters from hbj link to the component where the event method is going to be called. And also when I click the event how it is going to redirect other jsp.
Regards,
Suresh.BHello Reinuka,
It is possible to send parameter to Web Dynpro iview.
In the iview application parameters add Param1 =.
Place this code wherever you want to call that iview.
WDPortalNavigation.navigateAbsolute("ROLES:"+iview,WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null, WDPortalNavigationHistoryMode.NO_DUPLICATIONS,(String) null,(String) null,"Param1 = ");
"ROLES:"+iview=Iview Path
"Param=Paramvalue"=Parameter and its value
Youcan receive the value as
String parmvalue=WDWebContextAdapter.getWebContextAdapter().getRequestParameter("Param");
Regards,
Sridhar -
Passing parameters from one form to another
Hi,
I'm trying to pass parameters from 1 form to another. I would be able to call the form, but the parameters are not passed to the calling form. I do not know what's the problem. Basically, the 2nd form shows up with blank values in all the fields. Below is my code. Anybody expert in this, pl. help.
By the way my 1st form is based on PROCEDURE.
declare
s_requestor number(10);
s_customer_impact varchar2(4000);
s_creation_date date;
l_url varchar2(4000);
blk varchar2(10) := 'DEFAULT';
begin
p_session.set_value(
p_block_name => blk,
p_attribute_name => 'A_P_REQUESTOR',
p_value => 88888);
s_requestor := p_session.get_value_as_number
(p_block_name => blk,
p_attribute_name => 'A_P_REQUESTOR');
s_customer_impact := p_session.get_value_as_varchar2
(p_block_name => blk,
p_attribute_name => 'A_P_CUSTOMER_IMPACT');
s_creation_date := p_session.get_value_as_date
(p_block_name => blk,
p_attribute_name => 'A_P_CREATION_DATE');
l_url:=('/pls/portal/PORTAL.wwa_app_module.link?
p_arg_names=_moduleid&p_arg_values=1794837934&
p_arg_names=_show_header&p_arg_values=YES&
p_arg_names=REQUESTOR&p_arg_values='||s_requestor||'&
p_arg_names=CREATION_DATE&p_arg_values='||s_creation_date||'&
p_arg_names=CUSTOMER_IMPACT&p_arg_values='||s_customer_impact);
PORTAL.wwa_app_module.set_target(l_url);
end;the way to call one form from another and pass values for parameters from the procedure is like this:
PORTAL.wwa_app_module.link (
p_arg_names => PORTAL.wwv_standard_util.string_to_table2('_moduleid:_show_header:REQUESTOR:CREATION_DATE'),
p_arg_values => PORTAL.wwv_standard_util.string_to_table2('1191314879:YES:'||s_requestor||':'||s_creation_date));
and so on.
Hope it works for you -
Getting error , while passing parameters from one page to another page
Hello friends,
i am getting error, while passing parameters from one page to another page, below code i wrote.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
ArrayList arl=new ArrayList();
EresFrameworkAMImpl am=(EresFrameworkAMImpl)pageContext.getApplicationModule(webBean);
ERecordImpl ERecordObj=new ERecordImpl();
HashMap hMap = new HashMap();
hMap.put("1",ERecordObj.getTransactionName());
hMap.put("2",ERecordObj.getTransactionKey());
hMap.put("3",ERecordObj.getDeferredMode());
hMap.put("4",ERecordObj.getUserKeyLabel());
hMap.put("5",ERecordObj.getUserKeyValue());
hMap.put("6",ERecordObj.getTransactionAuditId());
hMap.put("7",ERecordObj.getRequester());
hMap.put("8",ERecordObj.getSourceApplication());
hMap.put("9",ERecordObj.getPostOpAPI());
hMap.put("10",ERecordObj.getPayload());
// hMap.put(EresConstants.ERES_PROCESS_ID,
if(pageContext.getParameter("item1")!=null)
pageContext.forwardImmediately(EresConstants.EINITIALS_FUNCTION,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hMap,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES
Error(71,2): method forwardImmediately(java.lang.String, byte, null, java.util.HashMap, boolean, java.lang.String) not found in interface oracle.apps.fnd.framework.webui.OAPageContext
Thanks
krishna.Hi,
You have imported the wrong class for HashMap.
Import
com.sun.java.util.collections.HashMap; instead of java.util.HashMap
Thanks,
Gaurav -
Passing parameters from JSP to JSP
How can I pass parameters from one JSP to another JSP?
JSP1 calls JSP2. I need to pass some values in JSP 1 to use in JSP 2.
Please help.
Thanks.use jsp:forward and param tags
-
Issue with passing parameters from JSP to Backing bean
hi ,
I have an issue in passing parameters from my JSP to backing bean. I want to fetch the parameter from my URL in backing bean .This is how i am coding it right now. But the parameter companyID returns me null.
URL http://localhost:8080/admin/compadmin.jsp?companyID=B1234.
In my backing bean
FacesContext context = FacesContext.getCurrentInstance();
String companyID = (String)context.getExternalContext().getRequestParameterMap().get("CompanyID");
public void setCompanyID(String companyID)
this.companyID=companyID;
public String getCompanyID()
return this.companyID;
faces-config.xml :
<managed-bean-name>admincontroller</managed-bean-name>
<managed-bean-class>com.admin.controller.AdminController</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>companyadminbean</property-name>
<property-class>com.admin.model.AdminBean</property-class>
<value>#{companyadminbean}</value>
</managed-property>
<managed-property>
<property-name>companyID</property-name>
<value>#{param.companyID}</value>
</managed-property>Please let me know if iam missing something.Appreciate your help in advance
ThanksThanks very much for your input. I made changes to my bean accordingly. Actually the method getAdminType() is a not a getter of a property. It's just a method which iam calling in AdminController bean constructor to verify whether the person is System Admin or Client admin. So now the issue is inspite of making changes still the link "Copy Users" shows up for Client admin too which is incorrect.
My Administrator bean:
public class Administrator {
boolean GSA=false;
boolean SA=false;
public Administrator(){}
public boolean isGSA()
return GSA;
public boolean isSA()
return SA;
public void setGSA(boolean value)
this.GSA=value;
public void setSA(boolean value)
this.SA=value;
}My backing bean:
public class AdminController {
private AdminBean adminbean = new AdminBean();
public AdminController(){
int userID=1234;
this.getAdminType(userID);
public void getAdminType(int userID)
Administrator admin = new Administrator();
if (userID<0) return;
try{
if(Rc.isGlobalSystemAdmin(userID)){
admin.setGSA(true);
}else if(Rc.isClientSystemAdmin(userID)){
admin.setSA(true); // i could see these values setup correctly in the admin bean when i print them
adminbean.setAdmin(admin);
} catch (Exception e){ }
Admin Bean:
public class AdminBean {
private Administrator admin;
public Administrator getAdmin()
return this.admin;
public void setAdmin(Administrator admin)
this.admin = admin;
faces-config.xml
<managed-bean>
<managed-bean-name>admincontroller</managed-bean-name>
<managed-bean-class>com.controller.AdminController</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>adminbean</property-name>
<property-class>com.model.AdminBean</property-class>
<value>#{adminbean}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>adminbean</managed-bean-name>
<managed-bean-class>com.model.AdminBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<managed-property>
<property-name>admin</property-name>
<property-class>com.model.Administrator</property-class>
<value>#{admin}</value>
</managed-property>
</managed-bean> My JSP:<h:outputLink id="ol1" value="/companyadmin/copyusers.jsp">
<h:outputText id="ot1" value="Copy Users" rendered="#{adminbean.admin.isGSA}" /><f:verbatim><br/></f:verbatim>
</h:outputLink> so now the issue is thelink copy users is displayed even #{adminbean.admin.isGSA} is FALSE. please advise.
Thanks
Edited by: twisai on Oct 15, 2009 7:06 AM -
Passing parameters from FORM to REPORT
Hello All,
How to pass parameters from a FORM to a REPORT in Oracle Application Server Portal.Vamsi, Are u capturing the imputs for these parameters in the form??
If u are capturing them in the form, then u need to add them to a parameter list (TEXT_PARAMETER) and while calling the report u can send it as a parameter in the RUN_PRODUCT call.
Pls check the syntax for adding parameters and calling report from form in the form builder help.
Maybe you are looking for
-
Question on internal table logic..
Gurus, I have a internal table as follows: it_tab: ID---ACTION---CHANGE A1-----X-- B2---- U C1-----X-- U C2-----X-- Without looping at the table, how can I find get the result that the internal table has 3 ids with ACTION ='X' and 1 ID with ACTION =
-
ZXF08U06 - userexit coding - Idoc syntax problem.
I am doing IDOC coding in the userexit <b>ZXF08U06</b> in which I am modifying values in structure edidd. It was working fine previously. But in further testing we got below error : 26 Error during syntax check of IDoc (outbound). Could you please
-
Hi, I am currently generating a pdf in a web template by adding a button with export functionality.Every time i generate a pdf i get a dialog box where in i can specify the layout ex: header, footer etc. Couple of questions. 1. While defining the but
-
Unity Connections remote call sign-in issue.
I have some users that when they dial there DID from outside they hit there VM press star and are prompted for their sign-in number and pin. Then I have some users that do the same thing, but the greeting just continues to play. I am sure there is a
-
Running Windows 8.1 Pro. In which folder can I find Adobe Add-On files in Windows 8. I've tried searching by extension name or using Extension Manager, but cannot find any logical location where the files are located. I found several in a folder unde