Script forms calling
HI,
How to call other form and program into anther form?
Because i need to dispaly both the data in one page
PERFORM GET_DATA IN PROGRAM 'SAPLZTEST' IF FOUND.
Here, SAPLZTEST is the main program of the FG ZTEST which holds the FM.
Regards,
Similar Messages
-
How to fill data when call function of sap standard script form?
Hi every experts,
<Priority Normalized>
In our system, when we log in 'FR', we can print purchase order in language Franch,in t_code:ME22N. And when logging in 'EN', we can print it in language English, in ME22N. The English form is just only translated from Franch, with all same structure and frame. The form is done by script form.
And when logging in 'ZH', we create a new program, calling function smartform, instead of translating from EN language. Because of different structure and frame, I don't know the way to write script, so I print puchase order by smartform, when logging in 'ZH'.
But I have a new issue. Our MM module consultant needs me to print Chinese form if one condition, print English form in other condition.
So I have no idea to solve it. Because in my program, I get data to fill smartform and call function of smartform. And I don't know how to get data to fill script form. I only know the function name, 'OPEN_FORM' 'WRITE_FORM' 'CLOSE_FORM'.....
If I only call the several functions, I will get only frame without no data. So who can tell me how to do????
<Urgency downgraded>
Edited by: Suhas Saha on Jul 26, 2011 3:34 PM
Edited by: Vinod Kumar on Jul 26, 2011 4:09 PMHi,
Normally if we look in NACE transaction, you can see that upto five different FORMS can be assigned to a single output type . i.e. for each form there will be a seperate routine through which it gets called. But it all start from the first form only.
so you need to write your code in the ENTRY of the first form and if it does not satisfy do not go for processing of it but just exit of that form ENTRY. so that it will take you to next form.
hope this helps.
Thanks,
Venkatesh -
Debug dynpro + call script form
Hello ,
I have a req, I need to debug the few dynpro, and one of the dynpro is calling a form and I have to figure it out, which form is this ( and from where it is called ). I have never worked with script form before, can any one let me know how I can figure it out that ( how to call a form, I mean it should be statemnt like, call form .... or ) ?
One another thing, I went into the coding, and there I see the screen ( in execution mode, the screen shows some button, ( e.g show , and after pressing this button show ,the form appers ), but when I went in flowlogic of the screen, I cant see those button ?
Any idea....
Regards,Shah,
Do like this.You might be pressing some push button after which the smart form or script is appearing.
do screen debugging.
enter /h in the command field and press enter.
now press the push button.
this will take you to the logic in the driver program where the smartform or script is getting invoked.
if it is a smartform you will see a function module SSF_FUNCTION_MODULE_NAME.
smartform name will be stored in LF_FORMNAME
put a watch point here to get the smartform name.
if it is a script you will come across the following functional modules.
open_form,write_form,close_form.
Script name will be given in the open form functional module.
If any doubt revert it.
K.Kiran.
Message was edited by:
Kiran K -
Sap script form perform statement
HI ALL ,
CAN ANYONE HELP ME WITH SAP-SCRIPT FORM AND PERFORM SYNTAX. THAT IS WHEN U NEED TO ADD A FIELD TO AN EXISTING SAPSCRIPT, BY USING AN EXTERNAL SUBROUTINE.
i NEED THE SYNTAX BOTH FOR PERFORM AND ENDPERFORM STATEMENT AND ALSO THE FORM STSEMENT. ANOTHER TRHING IS IF CAN LET ME KNOW HOW TO USE DEFINE STATEMENT IN SAPSCRIPT. WHATS ITS USE AND IS IT RELATED TO THE QUERY ABOVE.
else,
U PLZ LET ME KNOW ANY HELPFUL LINKS TO GO THROUGH.
THANLS IN ADVANCE,
ANUPMA.Hi anupma,
1. while calling subroutines from sapscripts,
there is a special technique,
which has got its own limitations.
2.
FORM abc
TABLES
in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
ENDFORM.
3. The perform in se38 program should be of the
above format only.
4. We cannot pass internal tables.
5. Rather we need to pass
VARIABLE NAME
VARIABLE VALUE
(see the structure of itcsy in se11)
6. In this form, we have to read
the internal table in_tab
to capture the variable name and its value.
7. Similary, to return the values,
we have to put one record (for each variable)
in out_tab.
regards,
amit m. -
Hi all,
I see some forms that have code in them...
The syntax is like that:
/: PERFORM GET_ITEM_PACK IN PROGRAM ZEXPORTSALESFORM
/: USING &VBDKA-VBELN&
/: USING &VBDPA-POSNR&
/: USING &VBDPA-VRKME&
/: CHANGING &PACKING1&
/: CHANGING &PACKING2&
/: CHANGING &KIMYASAL&
/: ENDPERFORM
What is the logic of writing code inside script forms...
Do we need it really?
Thanks.
Deniz.Hi Deniz..
We can call subroutines in Script Layout set using this PERFORM command.
This is used to perform any operations from the Layout set. Bcoz we cannot directly write any code in a Script Layout set.
**These are Text symbols for storing some values
/: DEFINE &PACKING1& = ''
/: DEFINE &PACKING2& = ''
/: DEFINE &KIMYASAL& = ''
**Calling subroutine
/: PERFORM GET_ITEM_PACK IN PROGRAM ZEXPORTSALESFORM
/: USING &VBDKA-VBELN& "Using parameters are like Read-Only in subroutine
/: USING &VBDPA-POSNR&
/: USING &VBDPA-VRKME&
/: CHANGING &PACKING1& "Using parameters can be modified in subroutine
/: CHANGING &PACKING2&
/: CHANGING &KIMYASAL&
/: ENDPERFORM
This subroutine must be defined in the program ZEXPORTSALESFORM
FORM GET_ITEM_PACK TABLES
INTAB STRUCTURE ITCSY "Contains all USING parameters
OUTTAB STRUCTURE ITCSY " Contains all CHANGING parameters
**implement the logic here
ENDFORM.
<b>REWARD IF HELPFUL.</b> -
Not able to print the script form from print preview
Hi Experts,
I need to print one of the script form from print preview. As per the req. first i need to generate a print preview of this form and if required should be able to print it from this preview.
i am able to generate print preview and also able to see the print option but when i try to print it is going to the spool (which i dont want). I want it to be printed directly to the printer instead of sending it to the spool.
Please suggest me
The way i coded it is
DATA: arcpar TYPE arc_params,
pripar TYPE pri_params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = 'X_65_132'
line_count = 65
line_size = 132
IMPORTING
out_parameters = pripar
out_archive_parameters = arcpar
valid = val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
pr_options-tddest = ''.
pr_options-tdpreview = 'X'.
pr_options-tdnoprint = ''.
pr_options-tdsuffix1 = 'STUFF'.
pr_options-tdsuffix2 = matnr.
pr_options-tdimmed = ''.
pr_options-tdlifetime = '2'.
pr_options-tdprogram = Form-name.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = space
form = "purchase or"
language = sy-langu
OPTIONS = pr_options
EXCEPTIONS
canceled = 01
device = 02
form = 03
OPTIONS = 04
unclosed = 05.
CALL FUNCTION 'START_FORM'.
ENDFORM. " open_and_start_form
Thank you.Hi,
Just pass the value 'X' to "pr_options-tdimmed" field.Try this.
I hope,it help you
<=<< Sharing Knowledge is a way to Innovative >=>>
By,
Yoga -
Perform a form routine within a sap script form
Hi!
How can I
perform a form routine within a sap script form.
Regards
sasOK,
many thanks for your kindly reply.
But basically there is a matter which I don't understand.
Which way is the better way to loop at internal table:
Solution1:
FORM xxx.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
FORM = 'ZSD_PACKING_LIST'
LANGUAGE = SY-LANGU .
LOOP AT gt_versand_plan INTO gw_versand_plan.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SHELEM'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN' .
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'.
ENDFORM.
Solution 2:
Having the LOOP within the sapscript form -> 'ZSD_PACKING_LIST'
Regards
sas -
Lines are owerwitting in sap-script form
Hi Experts
I have edited a script form in which i called 2 elements in page window , both elements have single line
in print priview both are overwitting eatch other
i am calling in program like dat
PERFORM write_form2 USING 'ADEXDUTY' 'ADEXDUTY'.
PERFORM write_form2 USING 'EX_BASIC' 'EX_BASIC'.
so what i do so both line comes line by line
ThanksHi,
In the command column give a line feed '\' . and check it out..
Regards,
Kumar -
Problem while creating script form - lang EN is not available in client 800
Hi friends,
I getting a problem while creating a script form in SE71.
if I give the name of the script (zform1) and clicked on create then its giving an information message like " Form ZFORM1 language EN is not available in client 800".
But if I use this form in the abap program its giving stop message "Form ZFORM1 language EN is not active and has no errors" and the control is coming out of the program.
What could be the problem and how to solve it friends . Please help me.
Thanks
-HimaHi There,,
By default all the forms will be there in client 100, if you are using the exisiting form and making a Z copy of the same,, then first you will have to copy from the client 100 to 800.
If you are creating the form right from the scratch,, you will that message,,but need now worry about that..
go head and create the Zform, don't forget to activate the form, before calling in the driver program.
In the driver program,, call the function modules to invoke the form and activate the driver program as well. then you are all set/
Thanks-
Rahul -
How to pass a JSP var to a Script function called in a netui:checkbox
How to pass a JSP variable to a Java Script function called in a netui:checkbox onSelect?
I have a requirement where based on the checkBox selected or deselected in a repeater tag I would have to select or deselect other checkboxes in a netui:form. I am trying to pass the index or unique name of the checkbox to the JavaScript function. When I try this code I am getting a Syntax Error!! and getting a " item undefined" in the javascript. This works when I use just the html form tag but when I use the <netui:form> tag I am facing this issue. Any help would be highly appreciated.
function selectACheckBoxOnClick(name) {
alert ("called selectACheckBoxOnClick ");
alert ("called name "+name);
<netui-data:repeater dataSource="{pageFlow.unregisteredContractAssetsDTOArr}">
<netui-data:repeaterItem>
<% String checkboxName = "selectACheckBox_"+i;
String serialNum = "serialNum_"+i;
String hidenboxName = "hiddenACheckBox_"+i;
String loopNo = new Integer(i).toString();
System.out.println("Loop String :"+ loopNo);
System.out.println("CheckBox Name:"+ checkboxName);
System.out.println("serialNum :"+serialNum); %>
<tr bgcolor="#ffffff">
<td align="center">
<netui:checkBox dataSource="{container.item.selectedAssetFlag}" onSelect="selectACheckBoxOnClick(<%=checkboxName%>);" tagId="<%=checkboxName%>"/>
</td>
<td class="small"><netui:label value="{container.item.model}"/></td>
<td class="small">
<netui:hidden dataSource="{container.item.splitAssetNo}" tagId="<%=serialNum%>"/>
<netui:label value="{container.item.serial}"></netui:label></td>
<td class="small"><netui:label value="{container.item.equpimentId}"/></td>
<td class="small">
<netui-data:getData resultId="siteId" value="{container.item.siteNo}" />
<%String siteId = (String) pageContext.getAttribute("siteId");%>
<netui:anchor action="getSiteLevelAssets" formSubmit="true">
<netui:parameter value="{container.item.siteNo}" name="siteNo" />
<netui:label value="{container.item.siteNo}" />
</netui:anchor>
</td> </tr>
<%i++;%>
</netui-data:repeaterItem>
</netui-data:repeater>
This code works within a form:
<td align=center>
<input type=image name="unassign" onclick="javascript:unassignReplacement(<%=replacementSupply.getPMSupplyId()%>)" src="<%=request.getContextPath()%>/images/bt_sm_x.gif" border=0 alt="Unassign">
</td>
Thanks,
Salomehi
i did not go thru your code completly
but u can use the following for your problem
the checkbox in the repeater must have unique TagID
counter = 0; (initialize)
<netui-data:repeaterItem>
<netui:checkBox dataSource="" tagId='<%="count"+String.valueOf(counter)%>' onClick="some function()" />
<%counter++;%>
</netui-data:repeaterItem>
here if u have 3 checkbox
They will have Tagid's as count1 , count2 and count3
now in the javascript somefunction()
use the following line
for(j=0;j<<%=counter%>;j++)
document.forms(0)[getNetuiTagName"count"+j)].checked=false;
} -
How to get the values from form calls in user exit?
Hi all,
I am not getting a specific value readily in an user exit.
?Can any one tell me how to find what are the fields,tables available in various form calls(visible while debugging) in an user exit.
For example sapxkl is one ofthe callls...(sapxkl)<table>[] will hold some data.how to find what r the values available for <table>.
Thanks.
Edited by: sanjay_ask on Apr 16, 2010 10:43 PMHI ,
Use this line of code
field-symbols: <l_fs> type any.
data: l_value type char20.
Get Plant
l_value = '(SAPLCEI0)GV_WERKS'. " Here give the program name and variable name
assign (l_value) to <l_fs>.
v_werks = <l_fs>. " Instead of V_werks use you internal table
Thanks
Subhankar -
How to get the last page SAP Script form
How to get the last page SAP Script form.
I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
RegardsHi
You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
From SAP Help:
This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
/: IF &NEXTPAGE& = '0'
Last page
/: ENDIF
Max -
Child form calling a method on it's parent's class.
I am developing a form-based application. There is one root
form called "Application" and a few child forms off the root (e.g.,
Login, CustView). I would like the sibling forms to be able to pass
contol to each other (e.g., after successful login, I want to make
Login invisible and CustView visible).
I wanted the root form to control this interaction, but I'm
not sure how events in child can be handled in the parent. This is
a common technique, but in this case, the parent doesn't explicitly
instantiate the child, so I can't just pass a reference to the
parent to the child's constructor. I can use this.parentForm to get
a reference to the parent form, but I can't seem to find the
parent's methods, just it's gui elements (i.e.,
this.parentForm.parentMethod() doesn't work).
Can some tell me how to do this? I am considering a
FormManager class, which is a singleton class that each form can
registers with and can use to toggle the visibility of itself and
its siblings, but I wanted to see if there was an easier way to
access methods on the class instance associated a parent's form.
Any suggestions?
Andy"agorman" <[email protected]> wrote in
message
news:e2163h$4na$[email protected]..
>I am developing a form-based application. There is one
root form called
> "Application" and a few child forms off the root (e.g.,
Login, CustView).
> I
> would like the sibling forms to be able to pass contol
to each other
> (e.g.,
> after successful login, I want to make Login invisible
and CustView
> visible).
>
> I wanted the root form to control this interaction, but
I'm not sure how
> events in child can be handled in the parent. This is a
common technique,
> but
> in this case, the parent doesn't explicitly instantiate
the child, so I
> can't
> just pass a reference to the parent to the child's
constructor. I can use
> this.parentForm to get a reference to the parent form,
but I can't seem to
> find
> the parent's methods, just it's gui elements (i.e.,
> this.parentForm.parentMethod() doesn't work).
>
> Can some tell me how to do this? I am considering a
FormManager class,
> which
> is a singleton class that each form can registers with
and can use to
> toggle
> the visibility of itself and its siblings, but I wanted
to see if there
> was an
> easier way to access methods on the class instance
associated a parent's
> form.
>
> Any suggestions?
>
Why don't you explicitly instantiate the children with a
reference to the
parent form. That way you could store the reference in the
constructor. As
long at the functions are public I think it should work.
Amy -
New Window for Form called from a form based on a procedure
Hi
I have a form that is based on a procedure that asks for an employee number. The number is then passed to the procedure. The procedure then calls the next form passing in the employee number.
This works however I would like the form called from the procedure to open in a new window while still being able to pass in the employee number as a parameter.
Is there a way to do this? I have tried looking at wwa_app_module.new_instance & wwv_media.show_newwindow but I these only take the moduleid, I can't see how to pass in the employee number at the same time.
Any help would be appreciated.
Thanks
BelindaHi,
You can pass parameters like this
wwv_redirect.url('SJAYARAM_9042F.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1060253649&p_arg_names=deptno&p_arg_values=10&p_arg_names=_deptno_cond&p_arg_values=%3d');
In this example the parameter deptno is passed with a value 10 and conditional operator '='
Hope that helps.
Thanks,
Sharmila -
How to insert the new field to standard scheduling agreement script form.
Hi Gurus,
how to insert the new fields to standad sheduling agreement script form. its a need for me, i want to display the AEDAT field in scheduling agreement form ,
The below one is my requirement,
ex:- Itu2019s requested the change of Scheduling Agreement printout. Itu2019s requested for this type of document, the insertion, into the field u201CData Emissionu201D into the print, of the document last modify date instead of the document creation date. (This change will be done only for position change into the Scheduling Agreement). No change into the PO.
Change SAPSCRIPT printout. Introduction, into the Scheduling Agreement, of last modified
document date (field EKPO-AEDAT).
Thanks & Regards
chinnuopen TNAPR table and give the output type you need to modify.... get the print program name and check if some structure already have the date you wanted... if you have it already... then open the form in SE71 tr. and provide the strcuture name - feild in the position you want to have the date...
se71--->
&<str. name>-AEDAT&
Maybe you are looking for
-
SSO between Portal and Java WD application
Hi Experts, I am using CE 7.2 on localhost and I am very new to SAP. I need to know how can I get SSO between Portal and Java WD. I have a WD application that displays the logged in user using "IUser currentUser = WDClientUser.getCurrentUser().getSA
-
Dear All, If check is printed one time then next time printed check will not be shown or display in check report. Is Oracle provide standard solution for it. I also developed report in rdf fromat , But it did not create restriction on printed checks.
-
Hi, I Have a Datablock which has Many Items...When I Open a Datablock Wizard ...The table is FND_DUAL. How i can know on which table or view the Datablock depends. The Name of the form is ARXSUPST.fmb I need to add a Collector Name Column in the Form
-
Deploy error because of sql server database adapter
I am new to BEPL, I tried to Transfer data from SQL server to Oracle. To connect with sql server I used database adapter and driver is MS JDBC 2.0 which works fine in Jdeveloper and compiled successfully but while deploying output folder's Jar file i
-
How to trigger IDOC'S from SAP
Hi All, How to trigger IDOC's from SAP(ECC 6)..where can we check this in mii 11.5 weather it is fail/success Thanks, Abhi