Help in routines!!
Hi All:
I work in BW and trying to write routines and having difficulties in internal tables. I have Internal table 1 and internal Table 2 with purchase order as key field.For the same orders I need some fields from table 1 and some from table 2 to form table 3 based on some conditions. Can anyone help me please.
Thanks,
Manasa.
Thank you for the quick reply. Here is the real requirement.
TABLE1
PO ITEM PLANT MATERIAL ORDERCATEGORY QTY
TABLE 2
PO SUPPLYINGPLANT ORDTYPE
TABLE 3
PO ITEM PLANT MATERIAL ORDERCATEGORY SUPPLYINGPLANT QTY1 QTY2 QTY3
QTY1 if ORDERCATEGORY (table1) = 1
QTY2 if ORDERCATEGORY (table1) = 2
QTY3 if ORDERCATEGORY (tabel1) = 3
Thanks,
Manasa.
Similar Messages
-
I have two ODS's - ODS1 and ODS2 . ODS1 feeds data to ODS2 using an
uppdate rule .ODS1 data is as follows
Billno Itemno cond keyfig
10 1 a 1
10 1 b 3
10 1 c 5
20 1 d 7
20 1 e 8
20 1 f 1
20 1 g 1
30 2 h 4
30 3 h 2
I need to populate a field in ODS2 (say sum) by summing
all values of keyfig for each bill no . for example in the
above case ods2-sum should be filled with values 9 ,16 and 6
for billno's 10,20& 30 respectively .
can someone pls help me with required code.
thanksHi,
In the start routine write the selection:
DATA: begin of it_int occurs 0,
billno type ods2-billno,
sum type ods2-sum,
end of it_int.
select billno sum( keyfig ) from ods1
into table it_int groupby billno orderby billno.
In the update routine for ods2-sum read the it_init:
read table it_int with key
billno = COMM_STRUCTURE-billno.
if sy-subrc = 0.
result = it_int-sum.
endif.
Regards,
Prema -
Hi Experts,
Can someone help me with a code to convert Lower case letters comming into BW for an Infoobject to be converted to Uppercase. i tried number of codes in the forum..but most of them gives me an error..
Thanks,
DVHi ram,
i put the code as you said and got the IO activated. Now is there any easy way to test it...??
Hi George, Yes my sytem is 3.5....can you please explian what that transformation function is??? is that coding ??? or something else???
Thanks Guys,
DV -
Hi guys,
Need help for routine code, i have rquirement currency translation based on currency type In the cube we having the Amount Key Figure in USD. i want to convert these values based on currency type or company code . ..GBP,JPY,INR,KRW..etc.
can any body help me for coding part.
Any suggestions will be rewarded.
Thank you
DST
Message was edited by:
DSTHi,
Thank you Satish,
Based on company code i want to convert USD to GBP,JPY....etc
Any inputs for routine.
Thank you
DST
Message was edited by:
DST -
Routine error in Trasport selection
Hi All,
I have a question with regard to transports. I am transporting info objects where i am getting this error wrt to a transport request which has 170 info objects.
The error message has two errors.
(1) <b>" Object '45EX1L0TIWA4LUWZHUIKRNOCF' (ROUT) of type 'Routine' is not available in version 'A "</b>.
(2). <b>" Object '45EX3Q1RNVZ0DVY20BZPLCSU7' (ROUT) of type 'Routine' is not available in version 'A "</b>.
Can anyone please tell me how to find out that particular routine, so that i can go and look into that and do the necessary.
I moved out that particular info object from the selected list thinking it might solve my problem, but the very next object is giving the same error message. So far i have removed 6 objects in succession and the same error message is repeating for every info object. The strange thing which i have observed is that the Routine object num is not changing and the same error messages are popping.
I checked the "routine" option in transport connection and Business content as well.It says that Input help for Routines in not yet available.
Please reply asap as i am in middle of a critical requirement.
Thanks and Regards,
Sudeep Moka.Hi Sudeep
It seems that some of your routines are not active. Not very sure but you may try this option. find the inactive routine in table RSTRAN with the object string given in your post.
identify the routine/object and activate.
Thanks
Tripple k -
Combining all line items in one output of material Document...
HI All,
We have created one new output type for the material document.
If we have multiple line items in the material document, the output must be assigned once in the document. But In our case it is assigning for each of the line item. Can any one help how to handle this issue.
Regards
Sukant
Edited by: sukanta patro Chinari on Jan 7, 2010 2:33 AMHi,
The issue solved. Needed to add some codes in the routine to restrict multiple assignments. For reference take the help of Routine number 173.
Regards
Sukant -
Making Text ID read only-Urgent
Hi Experts,
I have created a new text id at item level. This text id will be filled in sales order and copied in all subsequent documents. Now I want this text id to be filled only through some Z developments but should be available in the order documents in read only mode.
In the customizing, is it possible to mention that a text id should be read only.
I can achieve through coding but then I need to change many programs. Please advise.
Regards
SatishHi,
In VOTXN try to achive this with help of routine.
Or if you can find out any authorization object which will not users to change the text then it is great Ask your basis and ABAP guy wheather you can achive this by creating a Z authorization object.
COz in standard settings you can not acive this requirement.
I have never done this..but just thoughts
Reward points if useful
Regards,
Amrish Purohit -
How to create a program to eliminate invalid characters...?
I have a navigational attribute - ZnOORDIT where i am getting frequent invalid characters
can any one tell me how to code to eliminate invalid chars and correct it with the help of routine.Hi,
For this you would need to create a routine.
please go through this article.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50db4398-2dea-2b10-1fab-e3195bb311dc&overridelayout=true
You can also use Function Module 'SCP_REPLACE_STRANGE_CHARS' to Replace the Invalid/Special Character with space.
Regards,
Rk. -
Sorting internal table with line types
Hi,
I have internal table juts for an example with four entries as below:
A[]
Line.....Line Types
444001.....P
New York...C
Evershine..B
Mary.......N
I want to sort the internal table with line types in order of lin types NBCP.
How can i do this ?
Please help.
Note: Above example is just with four entries, there might be internal table with ten entries and ten defined sorting order for line types.Hi Tushar,
Please note that we can't changes the mandatory sequence of the address format as defined in the country specif address format. We can change the sequence of others fields by line_priority.
Try to change the address type :
ADDRESS_TYPE - Address type (from 3.0C)
There are three types of address:
Address type '1': addresses of firms or organizations; the address structure which is used in most SAP applications as 'Address'.
Address type '2': address of a person
Address type '3': work address, usually the address of a contact person in a company
Please use T/code "OY01"> Select Country> Example :AU"--> Display --> Select address key and press F1. You will find SAP 's Address format configuration .
sap help:
Formatting Routine Key for Printing Addresses
For printing addresses, there are country-specific routines which in each case copy the correct postal formatting of the address.
The three-character "Address Layout Key" for the recipient country controls which of the routines available for formatting addresses in the relevant country is used.
These routines are programmed into the ADDRESS_INTO_PRINTFORM function module.
They are based on different national and international guidelines and norms, including:
ISO 11180,
contracts of the World Postal Union (Seoul 1994),
international address samples from the World Postal Union
as well as the available rules of the individual countries.
Below you will find an overview of the country-specific formats currently implemented.
Customers can program their own formatting routines using a customer exit. The SZAD0001 SAP enhancement has been defined in the package SZAD for this (-> transaction CMOD).
General formatting rules
The following parameters are used depending on the transaction:
whether the company address (street/house number) or the P.O. Box address is printed if both exist,
how many lines are available for printing,
which is the sender country.
If there are not enough lines, then lines are left out according to a standard sequence.
The address format depends on whether the sender country is the same as, or different from, the recipient country. The country is always specified from abroad, either as a text name, or as an identification code of up to three characters (license plate code or country key).
Where the country name is written out in full, it is written in the language of the sender country. If a language is not specified for the sender country, or the sender country itself is not specified, the logon language is used instead.
Exception: the language for the country code can be explicitly overwritten by a parameter in the print program (e.g. when the country code for customs transit papers is always to be specified in a particular language, such as English). if the "Print country name in recipient language" flag is set in the print program, the recipient language is used.
Other language-dependent components such as the title and the word 'PO Box' are printed in the recipient language or the recipient country language. If this cannot be determined, the logon language is again used.
For all formats except Great Britain (006), Japan (013), and South Korea (017), the core of the address is formatted as follows (without empty lines, except for the compulsory empty line:)
title line (if applicable)
name block (differs depending on the address type, see below)
street address or PO Box
(compulsory empty line, if applicable)
city line with postal code
country code (if applicable)
The city line and the country name are always printed in upper case for foreign addresses (only for the complete address, not for short forms).
The name block generally consists of the following:
"Normal" addresses (address type SPACE and address type 1):
NAME1
NAME2
NAME3
NAME4
Personal addresses (address type 2):
Title of person and name of person
Business address with department and contact person (address type 3):
NAME1
NAME2
NAME3
NAME4
department
title of person and name of person
In addresses entered using Business Address Services (central address management) (see Release notes Central Address Management for Release 4.0 and Central Address Management for Release 4.5 ), the street address can comprise several lines (see Print street address), otherwise street and house number are maintained in the Street field.
Some countries do not have a compulsory empty line (see notes below). The city and district are printed in the city line, connected by a hyphen (exceptions: 004 USA, 006 Great Britain/Ireland, 013 Japan, 015 Germany, 017 South Korea, 019 Denmark), provided that the total length does not exceed 35 characters. If a different city is specified for the PO Box (PFORT), this is used in the PO Box address.
In all formats which use a country code (currently 001 European standard format 002 Italy, 011 Switzerland and 014 Austria ), the license plate code for that country is used. If this is not maintained, the country key in table T005 is used.
If the "Print country name in foreign addresses" flag is set for the sender country in table 005, the country code is not used; the country name is printed in the last line of the address.
Formats 004 (USA), 005 (Canada) and 008 (Singapore) contain a line ('F') for the function of the contact person in the company (if address type = '3'). This line comes immediately after the line 'N' (Name (and title) of the natural person).
In formats 002 (Italy), 004 (USA), 005 (Canada), 006 (Great Britain), 007 (Brazil) and Australia (009), the REGIO field (Region, State, Province, County) is formatted. For the USA, Canada, Brazil and Australia, the key from table T005S is used; for Great Britain the text name from table T005U.
In all countries for which no "Address structure key" is maintained, a standard format is used which corresponds to format "010".
Hope this may help you.
Lanka -
Minimizing all FCP windows at the same time
There are times I would like to minimize FCP, and not one window at a time - Is there a way to do this? It's faster for me to quit FCP, and restart than it is to close the viewer, canvas, etc..
Shane Ross wrote:
What are you asking to do? I am unclear. Do you want to HIDE FCP so you can see the desktop? Press Command-H.
Shane
I'm looking for flexibility right now - Primarily, looking to hide FCP to see the desktop. I am new to both the Mac and FCP (~ 1 week), and am currently in the playing/learning mode - I imagine a number of things I need/want now will not be needed once I'm comfortable - Right now, I can't rely on things I'm used to from the PC world, and am expending energy/focus on simple things - like where to find OS help, fighting routine keyboard instincts, etc. Not even to mention recalling FCP stuff - like using "J, K, L" keys, and was that "shift+Z", or Z,, ..... etc.
Command-H is a good thing to know - not sure quickest way to pick up these basics - Your reply was the type of thing I was looking for. I read some of the replies to my post, and don't know if others will understand why I want to hide FCP. Quite frankly, there are times I want FCP off the monitor, to get some "distance" and let things percolate. This may not make sense to all, or may no longer be in the memory of those who have been using FCP for a while, but this helps me.
So, thank you Shane for your answer - Command-H
I'm at the elementary school level once again -
Impact of Changing Data Package Size with DTP
Hi All,
We have delta dtp to load data from DSO to infocube. Default data package size with dtp is 50,000 records.
Due to huge no of data, internal table memory space is used and data loading get fails.
Then we changed the data package size to 10,000, which executes the data load successfully.
DTP with package size of 50,000 took 40 minutes to execute and failed, but DTP with package size of 10,000 took 15 minutes (for same amount of data).
Please find below my questions:
Why a DTP with bigger size of packet runs longer than a DTP with lower packet size ?
Also by reducing the standard data package size 50,000 to 10,000, will it impact any other data loading?
ThanksHi Sri,
If your DTP is taking more time then check your transformation .
1.Transformation with Routines always take more time so you if you want to reduce the time of execution then routine should be optimized for good performance .
2.Also check if you have filter at DTP level .Due to filters DTP takes long time .If same data get filtered at routine level it take much lesser time .
3.If you cannot change routine then you can set semantic keys at your DTP .The package data will be sorted as per semantic keys and thus it may be helpful at routine level for fast processing.
4.Your routine is getting failed due to internal table memory space so check if you have select statement in routine without FOR ALL ENTRIES IN RESULT_PACKAGE or SOURCE_PACKAGE line .if you will use this It will reduce record count .
5.Wherever possible delete duplicate records and if possible filter useless data at start routine itself .
6.Refresh internal table if data no longer needed .If your tables are global then data will be present at every routine level so refreshing will help to reduce size.
7.The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes.
8.Also check no of jobs running that time .May be you have lots of jobs active at the same time so memory availability will be less and DTP may get failed .
Why a DTP with bigger size of packet runs longer than a DTP with lower packet size ?
*Start and end routine works at package level so routine run for each package one by one .By default package have sorted data based on keys (non unique keys (characteristics )of source or target) and by setting semantic keys you can change this order.So Package having more data will take more time in processing then package have lesser data .
by reducing the standard data package size 50,000 to 10,000, will it impact any other data loading?
It will only impact running of that load .but yes if lots of other loads are running simultaneously then server can allocate more space to them .So better before reducing package size just check whether it is helpful in routine performance (start and end ) or increasing overhead .
Hope these points will be helpful .
Regards,
Jaya Tiwari -
Hi,
The PC: DS1_SBCGST008_ZOHM_O08 is getting failed in the BW side daily due to lower case letters issue for the follwing fields:OI_BASELO the infoobjects is:0OI_BASELO.
For the above fields data is getting from this table: MSEG.
Error:-Value 'GTL Duisburg ' (hex. '00470054004C002000440075006900730062007500720067 ') of characteristic 0OI_BASELO contains invalid c.
In R/3 side the field OI_BASELO (Base location) has entered GTL Duisburg but when we load the data into Bw its not allowed b'coz of lowercase letters which we have in R/3 for the above field OI_BASELO.
Please hightlight the solution for the above issue As we need to fix immediately.
Regards,
Sudhan ReddyHi Sudhan,
You can either change your lower case letter to upper case during load (with help of routine) or use the checkbox for lower case letter in characteristic maintenence screen.
http://help.sap.com/saphelp_nw04/helpdata/en/b7/f470375fbf307ee10000009b38f8cf/frameset.htm
Check these posts:
ALL_CAPITAL
ALL_CAPITAL String in RSKC
lowercase letters
Hope it helps,
Regards,
Ashish -
Hi SAP gurus can u explain me on user exits?
Hi Chandrakanth,
Userexits are system modifications. The requirements of the client which can be met with Standard SAP are done with help of routines or userexits.
Userexits are nothing but a provision given by sap to write your own code/logic in the standard program.
Say for example while processing a sales order you want to check certain criteria weather they are met or not then you can use userxit_save_document_prepare.Here depending on the code you write system checks the if the criteria is fulfilling if not you can set an error or warning message in the code. This userexit is being executed just before saving of document.
one more commonly used exit is adding field in field catalog
In spro check this path Sales and Distribution-System modifications-Userexits.
Read the document provided,you will find all the exits in different processing for SD with program name and their purpose.
User exits are the enhancements provided by SAP
you can use them in transactions. Each transaction will have user exits.
If you want to use your own requirements by making your coding while the transaction is run you can use user exits.
For example if you want to run the MRP in MD02 specific to MRP controller you can user exit.
Please also refer the document below.
USEREXIT
Userxits allow us to add our own functionality to SAP standard program
without modifying it. These are implemented in the form of subroutines and hence are also known as FORM EXITs. The userexits are generally collected in includes and attached to the standard program by the SAP.
All Userexits start with the word USEREXIT_...
FORM USEREXIT_..
z..
ENDFORM.
The problem lies in finding the correct userexit and how to find it if one exists for the purpose. Once the correct userexit is found the necessary customer code is inserted in the customer include starting with the z. in the form routine.
e.g. USEREXIT_SAVE_DOCUMENT_PREPARE
Certain application like SD still provide this form of enhancement using userexit but this practice is no longer being followed for newer extensions instead they are using EXITs which come bundled in enhancement packages . Nevertheless existing USEREXITS will be supported by SAP an all the newer versions of SAP.
HOW TO FIND USEREXITS
Userexits can be found in number of ways:
1) To find userexits in SD module , goto object navigator(SE80) and select
development class from the list and enter VMOD in it. All of the userexits in SD are contained in the development class VMOD. Press enter and you will find all the includes which contain userexits in SD for different functions like PRICING, ORDER PROCESSING etc. Select the userexit according to the requirement and read the comment inserted in it and start coding.
Some examples of userexits in SD (SALES & DISTRIBUTION) are:
1)ADDING OF NEW FIELDS IN PRICING
In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure. This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields. The fields which are not in either of the two tables KOMK and KOMP cannot be used in pricing .Sometimes a need arises when the pricing is to be based on some other criteria which is not present in the form of fields in either of the two tables. This problem can be solved by using USEREXITS which are provided for pricing in SD. Pricing takes place both when the SALES ORDER ( Transaction VA01) is created as well as when INVOICING ( Transaction VF01) is done. Hence SAP provides 2 userexits ,one for sales order processing which is
USEREXIT_PRICING_PREPARE_TKOMP or
USEREXIT_PRICING_PREPARE_TKOMK
Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two userexits.These userexits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.
In the case of userexit which will be called when invoicing is done ,these
are provided in the include RY60AFZZ which is in the standard SAP program SAPMV45A. The name of the userexits are same. i.e.
USEREXIT_PRICING_PREPARE_TKOMP or
USEREXIT_PRICING_PREPARE_TKOMK
These userexits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newly created field in the communication structure KOMG for this we fill the code in the above userexit using the MOVE statement after the data that has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these userexits and which is to be filled for that particular field is TKOMP or TKOMK.
Before the coding for these userexits is done ,it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose includes are provided in each of them .
To create the field in header data (KOMK) the include provided is KOMKAZ
and to create the field in item data (KOMP) the include provided is KOMPAZ.
One possible example for the need of creating new fields can be e.g. Freight to be based upon transportation zone, for this no field is available in field catalog and hence it can be created in KOMK and then above userexits can be used to fill the transportation data to it.
2) The other method of finding userexit is to find the word USEREXIT in the
associated program of the transaction for which we want to determine userexit using SE38.
3) The other method of finding userexits is to find the include in case of SD/MM applications where the userexits are located, this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.
Some other examples of userexits in SD are:
USEREXIT_NUMBER_RANGE
This userexit is used to assign a different internal document number to the
sales order(VA01) when it is created depending on some criteria like a different SALES ORGANIZAION(VKORG) .
USEREXIT_SAVE_DOCUMENT_PREPARE
This userexit is used to insert the ABAP code which will be called when
the document (sales order VA01) is just about to be saved. This userexit is used generally for custom checks on different fields , to display some information before the order will be saved or for making changes to certain fields before the sales order will be saved.
Exits & Enhancements
There are mainly six types of EXITs in sap which have been collected in the form of enhancement packages and attached to standard code in SAP.
These are different from USEREXIT in the way that they are implemented
in the form of FUNCTIONs while in USEREXITS we use form routines for their implementation. These are also sometimes known as function exits.
These start from the word EXIT_ followed by the program name and then followed by a three digit number.
e.g. EXIT_SAPMV45A_002
This exit is found in SD in enhancement V45A0002.
TYPES OF EXITS
1) MENU EXITS
2) FUNCTION EXITS
3) TABLE EXITS
4) SCREEN EXITS
5) KEYWORD EXITS
6) FIELD EXITS
We use SAP transactions CMOD and SMOD to manage exits. Before implementing an exit, it is required to create the project by using CMOD
selecting the enhancement e.g. V45A0002 and selecting the component
(one which fulfills our need) i.e. the exit which will be implemented in SMOD and after coding has been done the project has to be activated.
An exit can be coded only once.
FUNCTION EXITS
These are used to add functionality through ABAP code. These start from the word EXIT_programname_NNN ending in a 3 digit number. No access code is required to implement any type of exit including function exits.
The function exits are called from the standard SAP program in the form
of ABAP statement
CALL CUSTOMER-FUNCTION 'NNN'
This is in contrast to USEREXITs where PERFORM statement is used to call
the required userexit.
To implement the FUNCTION EXITs first of all the project is created and a suitable enhancement package is selected and from its components the function exit to be implemented is selected and on double clicking it the exit code will appear in ABAP EDITOR(se38) where a Z include will be found and the customer code should be entered in this include.
e.g.
ADDING A DEFAULT SOLD-TO-PARTY in Sales Order Creation
To show a default sold-to-party in this field when the user creates a sales order (VA01) we can use a function exit .This function exit is located in enhancement no V45A0002 . Before we can choose the exit we have to create a project in CMOD after that enter V45A0002 in the enhancement field and click on the components. In the components you will see the exit EXIT_SAPMV45A_002. This exit is used for our purpose.
Double clicking on this exit will takes us to function builder (SE37) . This
function exit has one exporting parameters and two importing parameters, we are interested in exporting parameter which is E_KUNNR of type KNA1-KUNNR i.e. if we move the desired customer name to this structure(E_KUNNR) it will be shown in the field as the default value when we create the sales order. This function also contains a customer include ZXVVA04. This include will be used to write our custom code.
Double clicking on this include and it will prompt us that this include does not exists do you want to create this object, select yes and the include will be created .In this include we can write our own code that will fill the field E_KUNNR.
e.g. E_KUNNR = 301.
Activate the include and Activate the project. Now when ever the SALES ORDER will be created, sold-to-party field will come up with a predefined customer.
FIELD EXITS
The field exits are managed, created, activated through program RSMODPRF. The field exit is associated with a data element existing in ABAP dictionary and hence to the screen field using that data element.
The format of field exit is:
FIELD_EXIT_dataelement_A-Z or 0-9
If a particular screen and program name is not specified than the field exit will effect all the screens containing that data element.
The function module associated with field exit shows two parameters
INPUT and OUTPUT. Input parameter contains the data passed to the field exit when the field exit was invoked by the R/3, we can write our own code to change the output parameter depending upon our requirements.
Before the field exit can have any effect the system profile parameter
ABAP/FIELDEXIT in all the application servers should be set to YES
ABAP/FIELDEXIT = YES.
User exits in the SD orders. These are program names (SE38):
MV45ATZZ
For entering metadata for sales document processing. User-specific
metadata must start with "ZZ".
MV45AOZZ
For entering additional installation-specific modules for sales
document processing which are called up by the screen and run under
PBO (Process Before Output) prior to output of the screen. The
modules must start with "ZZ".
MV45AIZZ
For entering additional installation-specific modules for sales
document processing. These are called up by the screen and run under
PAI (Process after Input) after data input (for example, data
validation). The User exits in the SD orders. These are program names (SE38):
MV45ATZZ
For entering metadata for sales document processing. User-specific
metadata must start with "ZZ".
MV45AOZZ
For entering additional installation-specific modules for sales
document processing which are called up by the screen and run under
PBO (Process before Output) prior to output of the screen. The
modules must start with "ZZ".
MV45AIZZ
For entering additional installation-specific modules for sales
document processing. These are called up by the screen and run under
PAI (Process after Input) after data input (for example, data
validation). The modules must start with "ZZ".
MV45AFZZ and MV45EFZ1
for entering installation-specific FORM routines and for using user
exits, which may be required and can be used if necessary. These
program components are called up by the modules in MV45AOZZ or
MV45AIZZ. e modules must start with "ZZ".
MV45AFZZ and MV45EFZ1
for entering installation-specific FORM routines and for using user
exits, which may be required and can be used if necessary. These
program components are called up by the modules in MV45AOZZ or
MV45AIZZ.
SMOD is the transaction to view user exits assigned to an object.
CMOD is the transaction to change the user exits according to your requirement.
You can find user exits by looking into the phrase USER_EXIT.
Check this program to find out user exits for a transaction
TABLES: tftit,
e071,
e070.
TYPES: BEGIN OF x_tstc,
tcode TYPE tcode,
pgmna TYPE program_id,
END OF x_tstc.
TYPES: BEGIN OF x_tadir,
obj_name TYPE sobj_name,
devclass TYPE devclass,
END OF x_tadir.
TYPES: BEGIN OF x_slog,
obj_name TYPE sobj_name,
END OF x_slog.
TYPES: BEGIN OF x_final,
name TYPE smodname,
member TYPE modmember,
include(15), "Include name
END OF x_final.
DATA: it_tstc TYPE STANDARD TABLE OF x_tstc WITH HEADER LINE.
DATA: it_tadir TYPE STANDARD TABLE OF x_tadir WITH HEADER LINE.
DATA: it_jtab TYPE STANDARD TABLE OF x_slog WITH HEADER LINE.
DATA: it_final TYPE STANDARD TABLE OF x_final WITH HEADER LINE.
SELECTION-SCREEN: BEGIN OF BLOCK blk01 WITH FRAME TITLE text-t01.
PARAMETERS: p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk01.
START-OF-SELECTION.
PERFORM get_tcodes. "Get Tcodes
PERFORM get_objects. "Get Objects
END-OF-SELECTION.
PERFORM display_results. "Display Results
FORM get_tcodes.
SELECT tcode
pgmna
INTO TABLE it_tstc
FROM tstc
WHERE tcode = p_tcode.
IF sy-subrc = 0.
SORT it_tstc BY tcode.
ENDIF.
ENDFORM. " get_tcodes
FORM get_objects.
DATA: l_fname LIKE rs38l-name,
l_group LIKE rs38l-area,
l_include LIKE rs38l-include,
l_namespace LIKE rs38l-namespace,
l_str_area LIKE rs38l-str_area.
DATA: v_include LIKE rodiobj-iobjnm.
DATA: e_t_include TYPE STANDARD TABLE OF abapsource WITH HEADER LINE.
DATA: l_line TYPE string,
l_tabix LIKE sy-tabix.
IF NOT it_tstc[] IS INITIAL.
SELECT obj_name
devclass
INTO TABLE it_tadir
FROM tadir FOR ALL ENTRIES IN it_tstc
WHERE pgmid = 'R3TR' AND
object = 'PROG' AND
obj_name = it_tstc-pgmna.
IF sy-subrc = 0.
SORT it_tadir BY obj_name devclass.
SELECT obj_name
INTO TABLE it_jtab
FROM tadir FOR ALL ENTRIES IN it_tadir
WHERE pgmid = 'R3TR' AND
object = 'SMOD' AND
devclass = it_tadir-devclass.
IF sy-subrc = 0.
SORT it_jtab BY obj_name.
ENDIF.
ENDIF.
ENDIF.
*- Get UserExit names
LOOP AT it_jtab.
SELECT name
member
INTO (it_final-name, it_final-member)
FROM modsap
WHERE name = it_jtab-obj_name AND
typ = 'E'.
APPEND it_final.
CLEAR it_final.
ENDSELECT.
ENDLOOP.
*- Process it_final contents.
LOOP AT it_final.
l_tabix = sy-tabix.
CLEAR: l_fname,
l_group,
l_include,
l_namespace,
l_str_area.
l_fname = it_final-member.
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = l_fname
IMPORTING
group = l_group
include = l_include
namespace = l_namespace
str_area = l_str_area
EXCEPTIONS
function_not_exist = 1
OTHERS = 2.
IF sy-subrc = 0.
IF NOT l_include IS INITIAL.
*- Get Source code of include.
CLEAR: v_include, e_t_include, e_t_include[].
v_include = l_include.
CALL FUNCTION 'MU_INCLUDE_GET'
EXPORTING
i_include = v_include
TABLES
e_t_include = e_t_include.
IF sy-subrc = 0.
LOOP AT e_t_include.
IF e_t_include-line CS 'INCLUDE'.
CLEAR l_line.
l_line = e_t_include-line.
CONDENSE l_line NO-GAPS.
TRANSLATE l_line USING '. '.
l_line = l_line+7(9).
it_final-include = l_line.
MODIFY it_final INDEX l_tabix TRANSPORTING include.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " get_objects
FORM display_results.
FORMAT COLOR COL_HEADING.
WRITE:/1(150) sy-uline.
WRITE:/ sy-vline,
2(23) 'Extension Name',
24 sy-vline,
25(39) 'Exit Name',
64 sy-vline,
65(74) 'Description',
140 sy-vline,
141(9) 'Include',
150 sy-vline.
WRITE:/1(150) sy-uline.
FORMAT RESET.
SORT it_final BY name member.
LOOP AT it_final.
CLEAR tftit.
SELECT SINGLE stext
INTO tftit-stext
FROM tftit
WHERE spras = 'EN' AND
funcname = it_final-member.
WRITE:/ sy-vline,
it_final-name COLOR COL_KEY, 24 sy-vline,
25 it_final-member, 64 sy-vline,
65 tftit-stext, 140 sy-vline,
141 it_final-include, 150 sy-vline.
WRITE:/1(150) sy-uline.
ENDLOOP.
ENDFORM. " display_results
Hope this Clarifies your Doubts and Please Reward If Really Helpful,
Thanks and Regards,
Sateesh.Kandula -
Urgent help required to write the code in update routine
Hi all,
i want to calculate open purchase order qty in update routine
formula is
open purchase order qty = scl qty - rec qty
where schd line date is less then or equal to 90 days from the current date.
I have written one code : but its giving error that comm_structure is not defined in abap dictionary,can any body help to write appropriate routine. this calculation i am making for MM, and data source and cube are 2lis_02_scl and cube is zc_pur01 ( made by coping the 0pur_c01), data source scl has all fields required in the foumula...here is my code
DATA: COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL.
DATA: SCL_QTY LIKE COMM_STRUCTURE-/BIC/ZK_SCLQTY.
DATA: GR_QTY LIKE COMM_STRUCTURE -/BIC/ZK_GRQTY.
DATA: SCL_DATE.
SCL_DATE = SY-DATUM + 90.
SELECT COMM_STRUCTURE -/BIC/ ZK_SCLQTY COMM_STRUCTURE -/BIC/ ZK_GRQTY FROM
/BIC/CS2LIS_02_SCL INTO SCL_QTY GR_QTY
WHERE
COMM_STRUCTURE -/0SCHED_DATE LE SCL_DATE.
IF SYSUBRC = 0
RESULT = SCL_QTY - GR_QTY.
ELSE = NOVALUE.
ENDIF.
Can any body help me soon its very urgent.
thanksHi Anupam,
I am not a very good ABAP Programmer, but found some things to notify u inyour code..
DATA: COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL,
SCL_QTY LIKE COMM_STRUCTURE-/BIC/ZK_SCLQTY,
GR_QTY LIKE COMM_STRUCTURE -/BIC/ZK_GRQTY.
DATA SCL_DATE LIKE SY-DATUM.
SCL_DATE = SY-DATUM + 90.
SELECT COMM_STRUCTURE -/BIC/ ZK_SCLQTY COMM_STRUCTURE -/BIC/ ZK_GRQTY FROM
/BIC/CS2LIS_02_SCL INTO SCL_QTY GR_QTY
WHERE
COMM_STRUCTURE -/0SCHED_DATE LE SCL_DATE.
IF SYSUBRC = 0
RESULT = SCL_QTY - GR_QTY.
ELSE.
What should be the return value if you dont have to calculate the result."
ENDIF.
try it.. and see..
regards,
kishore. -
Hi Gurus,
I need your urgent help on one requirement. I have to write a routine and the requirement is to bring data for K.F. "B" via comparing Materials between 0Material and 0MAT_UNITS.
0Material is already present in my flow and being loaded from DSO1 to DSO2 but 0MAT_UNITS not present. So I have to use a look-up on it using Materials from 0Material.
Materials has to be taken from 0Material and using condition as Observer-A(active) have to match with the materials of 0MAT_UNITS. If the material is present in 0MAT_UNITS with observer 'A' then take the Denominator and Numerator value for that material and produce a conversion factor for that material i.e. (Denominator/Numerator).
Now this factor need to be multiply with a K.F. "A" (already present in my DSO1) and assign the value to K.F. "B" as output (DSO2).
So pls guide me how should I code it in routine and which type of routine should I prefer.
Any effective help will be highly appreciated!!!!Dear Ravi,
Thanks for the promt response.
Actually no as such user exit is found for this requirement.
U know in the transaction VOFM we can create formula for example in my case for condition value..this is achieved by routine(some form in the include program) and then the routine number can be assigned in the configuration setting for the particular transaction. This is what info so far I have searched..but how to crete the routine and all.still i'm searching. Hope I gave you some ground abt the prob??
So if any body have ever come across this requirement..please suggest.
Thanks.
Anup.
Maybe you are looking for
-
Odbc error while retrieving the Query from Manage Sessions
Log Could Not Be Retrieved Odbc driver returned an error (SQLExecDirect). Error Details Error Codes: OPR4ONWY:U9IM8TAC File: odbcstatementimpl.cpp, Line: 186 State: S1000. Code: 10058. [NQODBC] [SQL_STATE: S1000] [nQSError: 10058] A general error has
-
JQuery function stops working when trying to submit large amount of parameters
Hi, Run CF9 on Windows 2008 R2 Server. I have a cfm page with multiple dropdowns (some are cfselect) and dynamically generated lists of checkboxes interdependent on each other. I am using JQuery to submit data to cfc functions and to display data. It
-
CS4 Bridge Crashing on Startup
Finally got CS4 at work, installed yesterday and everything fine. Today when going into Bridge, I got one of those Bridge experienced a problem and needs to close, errors. I rebooted, tried again, and got into bridge but then came up with the crash a
-
I can't erase my personal history for files which I saw.
Hi, I cannot erase my personal history for files which I saw. Does anyone know how to erase it? Thank you in advance.
-
How do I properly build a dll in cygwin (gcc) that can be loaded through Labview 5
I am a newbie to building dlls as well as to cygwin. I realize that this is more a cygwin/gcc dll build question, but I have built a dll (using cygwin) that can only be accessed by running an executable through cygwin. When I try accessing a function