How to combine Custom Converters on Custom Components
Hi, guys:
I created a custom component just following: http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
meanwhile, I also created a custom converter to convert any format of credit number to xxxx-xxxx-xxxx-xxxx. Right now, I'm wanting to use this custom converter with this custom component.
However, whenever directly use them as:
<cc:creditCardInput id="credit_card_number" size="19"
value="#{customerReg.paymentValue.creditCardNumber}">
<f:converter converterId="CreditCardConverter"/>
</cc:creditCardInput> MyEclipse IDE complains:
According to TLD, tag cc:creditCardInput must be empty, but is now.
Anyone can help me to solve it?
Thanks a lot
Paul
Thanks all of you for responses.
The related tld as below:
<taglib>
<tlib-version>0.03</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>Credit Card Example Component Tag Library</short-name>
<uri>http://bill.dudney.net/cc/component</uri>
<description>
This tag library has the tags for the java.net article about custom
JSF components. Most of the attributes are actually ignored in this
simple example.
</description>
<tag>
<name>creditCardInput</name>
<tag-class>alt.jsf.tags.CreditCardInputTag</tag-class>
<body-content>empty</body-content>
<description>
This is the tag for the credit card input component.
</description>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>immediate</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>rendered</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>required</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>validator</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>valueChangeListener</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>accesskey</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>alt</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>disabled</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>maxlength</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onblur</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onchange</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onclick</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>ondblclick</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onfocus</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onkeydown</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onkeypress</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onkeyup</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onmousedown</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onmousemove</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onmouseout</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onmouseover</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onmouseup</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>onselect</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
<attribute>
<name>readonly</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
Flag indicating that this component will prohibit
changes by the user. The element may receive focus
unless it has also been disabled.
</description>
</attribute>
<attribute>
<name>size</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
The number of characters used to determine
the width of this field.
</description>
</attribute>
<attribute>
<name>style</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
CSS style(s) to be applied when this component is rendered.
</description>
</attribute>
<attribute>
<name>styleClass</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
Space-separated list of CSS style class(es) to be applied when
this element is rendered. This value must be passed through
as the "class" attribute on generated markup.
</description>
</attribute>
<attribute>
<name>tabindex</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
Position of this element in the tabbing order
for the current document. This value must be
an integer between 0 and 32767.
</description>
</attribute>
<attribute>
<name>binding</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
The value binding expression linking this component to a property in a backing bean
</description>
</attribute>
</tag>
</taglib>
Similar Messages
-
Creating custom components in CS3
Can anyone here point me to a place to look to learn how to
make custom components in CS3? I found only two tutorials on it on
the entire internet - FlashBrighton and a SWC version posted by
someone named smackme. Neither of them really explains the AS logic
to how they work. Yes I can follow their instructions and get a
component to show up but neither helps me understand how to make my
own fairly sophisticated components.
Why is there such silence on this issue? Why doesn't Adobe
document how they work?
I don't get why a fairly important aspect of the software
isn't documented or explained. If anyone can point me somewhere to
look to learn about it, I'd appreciate it.
Thanks.This may help
http://www.flashbrighton.org/wordpress/?p=31
senocular(adobe employee) said on another forum that info
about components would be available shortly on the adobe
site. -
How to access variables in dynamically created custom components? (Flex 4.5)
Hi i have another riddle here.
i have few custom MXML components in my library and i am adding them to the stage by script, after that i want to fill some data, lets say Label.text, inside this component.
The question is how to acces / reference variables or other components inside the main custom component which was added to the stage by script???
thx M.ok, the answer is here
http://blog.flexexamples.com/2008/08/28/creating-a-component-instance-by-class-name-in-act ionscript-30/ -
How to implement expand/collapse property for custome components
can any one tell me how to implement the expand/collapse
property for the custom components in flex. i need something like
hierarchy of custom components which on the expand should be able
to show the children of the corresponding component and a line
linking between them and collapsing property too.. can any one help
me out.."hanu106" <[email protected]> wrote in
message
news:gfr2co$biq$[email protected]..
> can any one tell me how to implement the expand/collapse
property for the
> custom components in flex. i need something like
hierarchy of custom
> components
> which on the expand should be able to show the children
of the
> corresponding
> component and a line linking between them and collapsing
property too..
> can any
> one help me out..
Tree?
AdvancedDataGrid?
Nested Acordions -
How to hide combination (CUSTOMER / MATERIAL) in VK11
Hi Experts,
Please guide how to hide combination (Customer/Material) at the time update Excise duty condition in VK11.
BK GAIKWDPl refer this link for procedure
Transaction Variant - A Step by Step Guide for Creation
http://wiki.sdn.sap.com/wiki/display/Snippets/TransactionVariant-AStepbyStepGuidefor+Creation -
How to handle events between two custom components?
Hi ,
i want to handle events between two custom components, example if an event is generated in one custom component ,and i want to handle it any where in the application.....can any one suggest me any tutorial or meterial in this concept...
thanksEvents don't really go sideways in ActionScript by default. They bubble upward. If you want to send an event sideways, you will probably have to coordinate with something higher up in the event hierarchy. You can send the event to a common ancestor, and then pass it down the hierarchy as a method argument.
Another option is to use a framework that supports Injection. There are a number around these days. The one I'm most familiar with is Mate, which allows you to handle events and inject data in MXML. Mate is meant to be used as an MVC framework, and you may want to look into it if your application is complex, but you can also use it to coordinate global event handling if you don't need that level of structure. -
How to enable COLOR EFFECT, DISPLAY, etc. panels for the custom components?
POSITION AND SIZE and COMPONENT PARMETERS are the only panels available for the custom components. Is there a way to configure the custom components or the Flash Pro itself to enable other panels (COLOR EFFECT, DISPLAY, etc.) that available for the Adobe UI components?
In Flash CS6, you'll need to place your component(compiled clips) inside a Movieclip symbol to apply these settings. In Flash CC, you may do so directly from the Properties panel like for any other movieclip symbol.
Let me know if you face issues.
-Nipun -
How to find CUSTOMER EXIT for a Standard SAP program
How to find CUSTOMER EXIT for a Standard SAP program
Hi
To introduce the techniques of enhancement in standard SAP system. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
They do not affect standard SAP source code.
When you add new functionality to your SAP System using SAPs exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAPs standard software package.
They do not affect software updates.
When you add new functionality to your SAP System using SAPs exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects names ensure that they will not be affected by any changes or new additions to the standard software package.
Customer exits are not available for all programs and screens found in the SAP System.
Any change made to an SAP object in a customer system is called a modification. Customers usually modify their systems for one of two reasons. Either they make changes to the SAP standard in order to adjust the R/3 System to their specific business needs (actual modifications), or they alter individual SAP objects in order to correct an error (as recommended in an SAP error note).
You should only modify the SAP standard if the modifications you want to make are absolutely necessary for optimizing work flow in your company. Be aware that good background knowledge of application structure and flow are important prerequisites for deciding what kind of modifications to make and how these modifications should be designed.
SAP application programmers create SAP enhancements in transaction SMOD using function module exits, menu exits, and screen exits.
Customers are given a catalog containing an overview of existing SAP enhancements. They can then combine the SAP enhancements they want into an enhancement project using transaction CMOD.
SAP enhancements are made up of component parts. These components include function module exits, menu exits, and screen exits. A specific component may be used only once in a single SAP enhancement (this guarantees the uniqueness of SAP enhancements).
Customer enhancement projects consist of SAP enhancements. Each individual SAP enhancement may be used only once in a single customer enhancement program (this guarantees the uniqueness of a customer project).
SAP application programmers preplan function module exits, menu exits, and screen exits for their applications and combine them to create useful enhancements for the R/3 System.
Customers create their own enhancement projects for their systems using SAP enhancements. You can customize the individual components of an enhancement project by creating your own include programs (for function module exits), texts (for menu exits), and subscreens (for screen exits). -
Error while accessing application with custom components
Hi experts,
I have an application (HAP_MAIN_DOCUMENT) of component FPM_OIF_COMPONENT which uses a Webdynpro component with the same name (HAP_MAIN_DOCUMENT). This Webdynpro component (HAP_MAIN_DOCUMENT) uses 2 other components (HAP_DOCUMENT_BODY and HAP_DOCUMENT_HEADER).
For my client requirement, i need to create the custom components by copying from standard components as the UI layout changes are quiet huge and not manageable with the enhancements. To accomodate this i have changed the standard configurations by replacing the standard web dynpro components with the custom ones copied. Apart fomr this there are no changes to the standard.
While trying to access the application, i am getting the error as Null object reference. the details of the error is as below. Please advice.
Portal Error
Error when processing your request
What has happened?
The URL http://ddrsap12.dubal.domain:8001/sap/bc/webdynpro/sap/HAP_MAIN_DOCUMENT/ was not called due to an error.
Note
The following error text was processed in the system DSD : Access via 'NULL' object reference not possible.
The error occurred on the application server ddrsap12_DSD_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: WDDOINIT of program /1BCWDY/LUR96POELQNL3TIUWPYS==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/LUR96POELQNL3TIUWPYS==CP
Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
Method: INIT of program CL_WDR_CONTROLLER=============CP
Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
Method: INIT of program CL_WDR_VIEW_MANAGER===========CP
Method: INIT_CONTROLLER of program CL_WDR_INTERFACE_VIEW=========CP
ST22 Dump Analysis
Short text
Access via 'NULL' object reference not possible.
What happened?
Error in the ABAP Application Program
The current ABAP program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Information on where terminated
Termination occurred in the ABAP program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP" -
in "WDDOINIT".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 4640
of the (Include) program "/1BCWDY/B_LUXVEOR5WUW66V6QRRNU".
Termination occurred in a Web Dynpro application
Web Dynpro Component ZWD_HAP_DOCUMENT_HEADER
Web Dynpro Controller VW_HEADER_MAIN
The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
procedure "WDDOINIT" "(METHOD)", but it was neither handled locally nor
declared
in the RAISING clause of its signature.
The procedure is in program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP "; its source
code begins in line
4619 of the (Include program "/1BCWDY/B_LUXVEOR5WUW66V6QRRNU ".
Active Calls/Events
No. Ty. Program Include Line
Name
33 METHOD /1BCWDY/LUR96POELQNL3TIUWPYS==CP /1BCWDY/B_LUXVEOR5WUW66V6QRRNU 4640
CL_VW_HEADER_MAIN_CTR=>WDDOINIT
Web Dynpro Component ZWD_HAP_DOCUMENT_HEADER
Web Dynpro Controller VW_HEADER_MAIN
32 METHOD /1BCWDY/LUR96POELQNL3TIUWPYS==CP /1BCWDY/B_LUXVEOR5WUW66V6QRRNU 70
CLF_VW_HEADER_MAIN_CTR=>IF_WDR_VIEW_DELEGATE~WD_DO_INIT
Web Dynpro Component ZWD_HAP_DOCUMENT_HEADER
Web Dynpro Controller VW_HEADER_MAIN
31 METHOD CL_WDR_DELEGATING_VIEW========CP CL_WDR_DELEGATING_VIEW========CM003 3
CL_WDR_DELEGATING_VIEW=>DO_INIT
30 METHOD CL_WDR_CONTROLLER=============CP CL_WDR_CONTROLLER=============CM00Q 3
CL_WDR_CONTROLLER=>INIT_CONTROLLER
29 METHOD CL_WDR_VIEW===================CP CL_WDR_VIEW===================CM00K 5
CL_WDR_VIEW=>INIT_CONTROLLER
28 METHOD CL_WDR_CONTROLLER=============CP CL_WDR_CONTROLLER=============CM002 7
CL_WDR_CONTROLLER=>INIT
27 METHOD CL_WDR_VIEW_MANAGER===========CP CL_WDR_VIEW_MANAGER===========CM008 70
CL_WDR_VIEW_MANAGER=>GET_VIEW
26 METHOD CL_WDR_VIEW_MANAGER===========CP CL_WDR_VIEW_MANAGER===========CM005 23
CL_WDR_VIEW_MANAGER=>BIND_ROOT
25 METHOD CL_WDR_VIEW_MANAGER===========CP CL_WDR_VIEW_MANAGER===========CM00B 17
CL_WDR_VIEW_MANAGER=>INIT
24 METHOD CL_WDR_INTERFACE_VIEW=========CP CL_WDR_INTERFACE_VIEW=========CM004 11
CL_WDR_INTERFACE_VIEW=>INIT_CONTROLLER
23 METHOD CL_WDR_CONTROLLER=============CP CL_WDR_CONTROLLER=============CM002 7
CL_WDR_CONTROLLER=>INIT
22 METHOD CL_WDR_VIEW_MANAGER===========CP CL_WDR_VIEW_MANAGER===========CM008 70
CL_WDR_VIEW_MANAGER=>GET_VIEW
Thanks in advance,
Regards,
Ravi.Hi ,
How are you able to configure Custom Web dynpro application to Appraisal document instead of HAP_MAIN_DOCUMENT. could you please share the steps. We have created custom application a copy of HAP_MAIN_DOCUMENT and the other two webdynpro components are also copied.
We dont know how to link this to Appraisal template. BADI HRHAP00_BSP_TMPL is used to change application names for BSP application. How to change application name for Web dynpro ABAP. Please share the stpes which will help us
Thanks and Regards,
Kothand -
How to Access Custom Event using AS3?
Hi All,
Maybe it's that its Monday morning and my brain is still foggy, but I can't seem to figure out how to set custom events using AS3.
I have a custom GridRow itemRenderer, and have declared the event using the appropriate metatags.
Then I create the GR item dynamically using AS3 instantiation, but the event is not available for selection in the intellisense drop-down.
Let's take the following as an example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Grid
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:renderers="com.brassworks.renderers.*"
creationComplete="componentInit();"
>
<mx:Script>
<![CDATA[
private function componentInit():void
newRow :MyRow = new MyRow();
//newRow.myEvent is not an available option to set
]]>
</mx:Script>
</mx:Grid>
Then the itemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<GridRow
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:classes="com.brassworks.components.classes.*"
creationComplete="componentInit();"
>
<mx:Metadata>
[Event(name="myEvent", type="flash.events.Event")]
</mx:Metadata>
<mx:Script>
<![CDATA[
private function itemChanged(event:Event):void
Alert.show("test");
this.dispatchEvent(new Event("myEvent"));
]]>
</mx:Script>
<mx:GridItem>
<mx:TextInput
change="itemChanged"
/>
</mx:GridItem>
</GridRow>
How do I go about setting the handler method for custom events on instantiated items? Do I need to do this via the AddEventListener() method? Does this mean that events aren't exposed in ActionScript like they are in MXML? (In MXML all I have to do is <MyRow myEvent="handler(event)" />.)
Thanks!
-MikeYes, I you need to do this via the addEventListener() method.
myRow.addEventListener( "myEvent", myHandler );
I hope that helps.
Ben Edwards -
How to create custom(or) user defined component in SAPTAO
Hi,
Please provide me some document or steps on how to create custom component in sap tao.
Thanks a lot in advance.
Regards,
SudhaHi,
If you want create any custom components, you should use SAP QTP to create it.
Here are the simple steps:
i) Go to QTP -> Click on New - > Select Scripted Component - > ((Select SAP_Doc) area (i.e. whatever application area you have created for SAP TAO installation)) -> Record or Write a script based on your requirement & save
ii) Go to QC -> BPT -> open above component and insert the parameters and call these values in QTP script level (either way you can do)
iii) Create a datasheet and declare the parameters in datasheet and call this sheet whenever you have required.
Good luck.
Ram -
What do I need to create Flex custom components for Xcelsius 2008 SP3?
Hello, and thanks for your time.
I have recently been roped into creating some custom components in Flex 3 for use in Xcelsius 2008 SP3. I can create custom components in Flex, but I have no idea how to get them into Xcelsius.
I have begun my own research into everything I am going to need, but I am hoping someone out there who has done this can provide a user-friendly itemized list of all the parts that are needed to accomplish this task. I want to make sure I do not miss anything.
Thanks for any insight you may be able to provide.
What I have so far:
Flex Builder 3
Xcelsius Engage Server 5.3 (2008)
What I think I need:
Xcelsius 2008 component SDK
Cheers!
Edited by: midasxl on May 5, 2011 6:11 PMHi Manisha,
Even we have a requirement to create doughnut chart in flex and need to add it in xcelisus.I can bulid that in flex and it is working with static data.Please provide me the sample code of how to pass dynamic data from xcelsius excel to this chart and how to create properties file for this chart.I have looked at horizantal slider example but that doesn't help much.
Thanks in Advance.
Regards,
Karthik -
Subcontracting Flow with Customer Components
Hi experts,
I have tricky scenario in our project, that maybe you can help me to solve.The scenario is the following:
1) Customer X, ask for Material 1
2) Material 1, is produced by Vendor Y (Subcontractor).
3) Material 1, has as component Material 2 and Material 3
4) Material 2, is provided by another vendor Z.
5) Material 3 is provided by Customer X, Free of Charge.
6) Components are then sent to Subcontractor.
This whole process is supported by Scheduling Agreements, which means, that we run MPS and MRP, and from Customer Demand, we get the information about how much we need from Vendor Y (for finished goods), Vendor Z for Material 2, and Customer X (also a Vendor) for Material 3.
The stock of Material 3 should be non-valuated, since is not our property, but we are legally responsible for it (if pieces are lost, we have to pay the customer).
The issue we have right now, is that, in order to have this requirement we had to setlle a Scheduling Agreement with 0,01 price...for Customer, when actually there is no price at all.
We need to:
1 - Manage Inventory of Customer Components
2 - This Stock must be unvaluated
3 - We need to plan how much of components need from Customer
4 - We need a Free of Charge Order/Schedluling Agreement in order not to have a 0,01 residual value
Did you have a similar situationbefore? How did you solve it? We thought in have a Vendor consigment, but anyway, we should pay when consuming the materials....and it is the same issue..
I hope you can help me....Thank you very much in advace!
Best Regards,
LucasHi,
1. Define your customer materials (both component and finished product) as non valuated material, because these materials not effecting the our inventory.
2. create Bom for finished product.
3. Create sales order for service charges with reference to your customer PO.
4. Receive the component from your customer through 501 E (with out po sales order specific).
5. Create Production order with reference to sales order through MRP or manual.
6. confirm the production order and receive the
finished product.
7. Delivery to customer as in normal sales process.
8. Then create performa invoice or billing to your customer.
You can follow the above process, if have any further quarry please let me know.
Subrahmanayam -
How to create Customer data TAB in PO -ME23N
Can anyone tell me how to add 'Customer data' TAB in the PO heade TABSTRIP. I have to add it in the header besides 'Status' TAB.
I know an enhancement 'MM06E005' which is used for this purpose.
Thanks
SMSHi
see this sample doc and do it accordingly
by creating a project in CMOD and assigning the Enhancment MM06E005 and writing the code in the respective screen
How to implement screen exit for a SAP standard transaction
Introduction
SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
To pave way for this, SAP has provided the option for screen exits. Usually, SAP provides the following:
An append structure in the database table with the new fields.
A subscreen area into the standard screen where the programmer can attach his subscreen of his own program with the new fields.
A function group under which the new subscreen has to be created with the new fields.
Function exits to synchronize the PBO and PAI of the standard SAP program with the PBO and PAI of the subscreen so that data can flow back and forth between the standard SAP program and the program written by the developer for the subscreen. These function modules also exist in the same function group under which the subscreen will have to be developed.
Finally, a linkage has to be done between the subscreen area of standard SAP screen with the custom subscreen constructed by the developer.
Typically, SAP provides an enhancement in which the developer can create an append structure, use the function exits to synchronize the PBO and PAI of the standard SAP program and the custom subscreen program, and make the necessary linking( as mentioned above in step 4. But, again, this is not a hard and fast rule. Linking in some case, is also done by configurations.) SAP also usually provides the name of the function group under which the subscreen has to be developed.
Necessary guidance about implementing a screen exit development is usually available in the Documentation section of the enhancement ( can be availed by transaction SMOD).
Pre-Requisites
The developer to work on screen exit should have essential knowledge on the following:
DDIC concepts, including the knowledge of append structure.
Concept of SAP Enhancements and implementing them using Projects.
Concept of function exits.
Knowledge on Module Pool including subscreens, Tabstrip controls etc.
Steps
Guidelines
So, a developer can follow the guidelines mentioned below to implement a screen exit to a standard SAP transaction, as and when required:
Find out the Required Enhancements
Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton SAP Applications. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest for e.g., Purchasing, Asset Accounting, etc.
Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
Utilize the Enhancement in a Project
After you have found one, do as directed in the documentation. Generally, the steps are as follows:
Create a project using CMOD including your enhancement.
Create the append structure with new fields.
Go to the desired function group and create a subscreen with the new fields. Write PBO and PAI for the subscreen, if required.
Use the function exits in the enhancement to link the PBO and PAI of the subscreen with that of the main SAP program supporting the SAP transaction.
Maintain necessary linkage between the subscreen area of standard SAP program with the custom subscreen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.
Activate the project.
Test to ensure that required functionality are met.
Case Study 1
Add three new custom fields for Asset master and maintain information for them
Requirement
Three fields in the legacy system have to be maintained in Asset master. These fields are:
Original Asset number 20 characters
Location 2 15 Characters.
Model no 20 characters
Location 2 should start with L.
Pre-Analysis
Finding out the Enhancement
As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):
Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields
Studying the Function Exits
The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out for the purpose for their use:
EXIT_SAPLAIST_002
Function module Level Documentation
This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.
Import Parameters
Understanding
This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.
EXIT_SAPLAIST_003
Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:
Understanding
This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.
Studying the Documentation of the Enhancement
The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.
Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:
Deciding the Final course of Action
After making all the investigations, the final course of action was determined.
SrlNo Step Justification
A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be CUST (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.
In the PAI of the subscreen, validation for Location to start with L will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.
In the custom include of the function exit module EXIT_SAPLAIST_002, the following code will be written:-
ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.
In the custom include of the function exit module EXIT_SAPLAIST_003, the following code will be written:-
E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.
Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done otherwise, the new custom subscreen will not be displayed in the Asset master screens.
Development
Creating a Project to include the enhancement
Go to transaction CMOD and create a project.
Enter a description for the project. Then, click on the pushbutton Enhancement Assignments in the Application Toolbar.
Enter the name of the enhancement and Save.
Go to Components.
Creating Custom Include for ANLU
The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
Create the include structure with three new fields, as required. Then, save and activate it.
Develop the subscreen and the program
Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
Create it as subscreen.
Then, go to the Layout of the screen and create three new fields from Database table ANLU.
Drag the fields in the screen body and place them.
Then, save and activate the screen and come back to screen flow editor.
Create the PAI module to add validation for field Location 2, as required .
Activate the whole function group and come out.
Write code in the Function Exits to synchronize the programs
Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
Then, activate everything the whole project and come out.
Complete the configuration to link the subscreen
The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
Here, the requirement is to create these three custom fields in the tab page General of asset master screen ( AS01/AS02/AS03/AS91).
Determine the Layout
To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class 1000 and click on folder General Assignment of Layout.
Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout SAP cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
Create new tab layout
Go to transaction AOLA. Copy the tab layout SAP to create another layout, say, YSUB.
System will copy all the settings and will inform you about that.
Select your newly created layout and double-click on the folder Tab page titles.
You want to put your custom fields in the tab page General. So, select this tab page entry and double-click on the folder "Position of Groups".
Here, all the field groups currently residing in the tab-page General are shown. Add an entry for your newly created fields.
Select the group box from the list. An entry will come with U padded with the custom subscreen prepared by you.
Then, save and come out.
Assign the new Layout to Asset Class
Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
Save and come out.
Test the Exit
Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.
Original Source: ittoolbox.com
Regards
Anji -
How to save Custom control records module pool program ?
Hi guru ,
1. How to save Custom control records module pool program ?
I wrote multiple lines of record in custom control
Who to save that records ?
thanking you.
Regards,
Subash.Hi Subasha,
Please check the format below since it is based on a working code
**************data declarations
TYPES: BEGIN OF TY_EDITOR,
EDIT(254) TYPE C,
END OF TY_EDITOR.
data: int_line type table of tline with header line.
data: gw_thead like thead.
data: int_table type standard table of ty_editor.
You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
****************fill header..from SO10( t-code )
GW_THEAD-TDNAME = loc_nam. " unique key for the text
GW_THEAD-TDID = 'ST'. " Text ID
GW_THEAD-TDSPRAS = SY-LANGU.
GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
*Read Container and get data to int_table
CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = int_table
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
others = 5.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop data from int_table and save to int_line-tdline appending it.
*save the text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = GW_THEAD
TABLES
LINES = InT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC 0.
ENDIF.
The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
Please check and revert,
Reward if helpful
Regards
Byju
Maybe you are looking for
-
How do I copy and paste from one page or file to another page or file - on the same screen?
How do I copy and paste from one page or file to another - on the same screen?
-
I have hundreds of products that all have the same variant configurations, and I understandably don't want to pay someone to manually go through the WebTools interface to create all the variants. After looking through the WebTools database, I am pla
-
Problem executing programs after instaling Studio 8.1
I had JDK 1.5 installed on my computer. I earlier used to code my programs either in a text-editor or JCreator & run them from the command prompt. I recently installed Studio Enterprise 8.1. My programs execute successfully from the IDE. They also co
-
My University lab has a volume license for CS3. I am trying to activate on my computer, but keep getting the 'maximum number of activations reached' error. Is there anything that can be done to activate this? Thanks in advance, Ryan
-
The calls I make go through, but I don't hear it ringing or the other person when they answer. I can't hear anything when I make the phone call. How do I fix this?