About user defined routine in lsmw
Hi,
When we create user defined routine in lsmw.
it ask for input parameter and out put parameter.
after that it will create one subroutine.
But how to map input parameter of sub routine with source field.
thanks,
Jigar
Hi Jigar,
when you have selected a project and a subproject your first screen
will be the personal menu of the LSMW. You will find here a step-by-step-wizard
which you have to execute in sequence. If a step is executed the cursor is automatically positioned on the next step.
Choose 'Maintain field mapping and conversion rules'.
If the mapping is displayed set the cursor on the field you want to edit.
Press the button 'Rule' on the button bar above the mapping.
You will get a Popup where you can select 'User-defined routine (reusable)' (that is the last radio button).
Regards,
Ralf
> But how to map input parameter of sub routine with
> source field.
Similar Messages
-
hi all,
Can anyone explain the significance of user defined routines in lswm. In which scenario we use user defined routines. Can anyone explain userdefined routines with an example.
thanxs
hariHi,
Go to the transaction code LSMW. Create a new object. In the "Maintain object attributes" part, you define what standard object routine that you want to use. Here are a few from 46c
0001 Long texts
0010 GL a/c master record
0020 Material master
0030 Material BOM
0035 LIFO Layer
0040 Vendor master
0050 Customer master
0060 Purchasing info rec.
0070 Condition record
0080 Purchase requisition
0085 Purchase Order
0090 Sales documents
0100 Financial documents
0105 LockBox
0110 Goods movement
0120 Manual reservation
0130 Classification
0140 Class
0150 Characteristic
0160 Fixed assets
0170 Routing
0180 Planned indep.reqmts
0190 Doc. purch. info re
0210 Storage bin (WM)
0220 Warehouse stock (WM
0240 Inspection plans(QM
0250 Bank data
0260 Work center
0300 Rental unit
0310 Lease-Out
0320 Business entity
0330 Property
0400 Equipment
0410 Message (IH)
0420 Confirmation (IH)
0425 Measuring point
0430 Measuring document
0440 Functional location
0450 Object link
0460 Maintenance plan
0470 Equipment task list
0480 FnctnlLoc.TaskList
0490 Gen.task list
0555 HR master data
0600 PostCode,Loc.,St.,..
0602 PostCode,Loc.,St.,..
0610 Cities
0612 Locations
0620 Postal codes
0622 Postal codes
0630 Districts
0632 Districts
0640 Streets
0642 Streets
0650 P.O. boxes
0652 P.O. boxes
0777 Personnel Planning
0800 Do not use!
Each object has several methods under it, some for Batch input, or direct input, or some for Create, Change, Delete. It really depends on the object.
refer the link:
Lsmw
<b>Reward points</b>
Regards
Message was edited by:
skk -
LSMW - Maintain Fixed Values, Translations, User-Defined Routines
Hi all,
I know a little about LSMW.I can perform all the steps and I have uploaded from flatfile to standard tables for transaction XK01. I just want to know what we can perform in sixth step.If I want to write a user defined routine how can I do that ? Can anyone explain me with a simple example and detailed description.
Regards,
Vijay.hi, you means the 'Maintain fixed values, translations, user-defined routines'.
You can definite some fixed values and translations rule in this step.
And go back to the 'Maintain field mapping and conversion rules' steps.
You can utility these pre-defined in the data mapping.
E.G.
You defined a fixed valued name 'BUKRS'
Through click the button in the application bar in step 5,
you can use a FV_BUKRS in data mapping.
FV_BUKRS is the name of the fixed value name in data mapping.
thanks -
LSMW User define routine translation
hi gurus,
I'm trying to load assets using LSMW. Everything is working fine except a minor issue. I'm trying to upload the vendors' for assets by using translation. There are some valid vendor codes which I've maintained in translation table. However there are some invalid vendor codes from legacy system (the asset is very old and the company doesn't deal with the vendor no more). For these invalid codes I want to assign a constant value but since I've not maintained the translation for these codes, LSMW issues an error during conversion. How can I create a user defined routine to assign the invalid vendor codes that I haven't maintained in the table to a constant value. thanksIn the step u201CMaintain Field Mapping and Conversion Rulesu201D declare global variables in the
u201CGlobal Data Definitions and Declarationsu201D section after you select all the checkboxes in the Popup window u201CDetermine Layoutu201D from the menu path u201CExtras / Layoutu201D.
Here is a example of the global data declaration :
__GLOBAL_DATA__
DATA: cTmp(250) TYPE C, iTmp TYPE I.
TYPES: BEGIN OF stBase.
TYPES : MESSAGE(250) TYPE C,MESSAGET
INCLUDE TYPE ZCAFSMMUPLDFMT.
TYPES : EWFIELDS(2000) TYPE C.
TYPES: END OF stBase.
Then, at the bottom of the u201CDisplay Field Mapping and Conversion Rulesu201D screen you can enter your User ABAP Routine within the u201CForm Routine (ABAP routines)u201D node. Below is a example of a routine :
FORM urOutputE1MARCM CHANGING pOut.
pOut = 0.
CLEAR waTmpE1MARCM. FREE itTmpE1MARCM.
MOVE-CORRESPONDING E1MARCM TO waTmpE1MARCM.
APPEND waTmpE1MARCM TO itTmpE1MARCM.
iTmp = 0.
iTmp = STRLEN( waTmpE1MARCM ).
IF iTmp > 0.
REPLACE ALL OCCURRENCES OF REGEX '/' IN TABLE itTmpE1MARCM WITH '
iTmp = 0. CLEAR waTmpE1MARCM.
MOVE-CORRESPONDING itTmpE1MARCM TO waTmpE1MARCM.
LOOP AT itTmpE1MARCM INTO waTmpE1MARCM. ENDLOOP.
iTmp = STRLEN( waTmpE1MARCM ).
IF iTmp > 0.
pOut = 1.
ELSE.
pOut = 0.
ENDIF.
ENDIF.
ENDFORM.
You can then call the routine within your mapping. I used the example a in the u201C__END_OF_RECORD__u201D node of a IDoc Segment to control whether or not the Segment is to be outputted or not.
PERFORM urOutputE1MARCM CHANGING iTmp.
IF iTmp > 0.
transfer_record.
ENDIF.
I hope this helps some. -
LSMW Fixed, Translations and User defined routines??????
Hi Experts,
I have another questions here.. I can see the step called Maintain Fixed values, Translation and User defined routines in LSM Workbench, why is it used, when its used and where???
If its possible can someone give me examples for this particular step...
Well, I wanted to award some points to experts like RICH, CHRISTIAN AND ZHENGLIU, but my screen is not showing the points radio button. But I will award, as soon as possible.
Thanks and waiting for your replies.
Regards,
-Ken CAlso check http://help.sap.com/saphelp_erp2005/helpdata/en/7a/5e3d38faba11d1b40f006094b944c8/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/7a/5e3d38faba11d1b40f006094b944c8/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/7a/5e3d38faba11d1b40f006094b944c8/frameset.htm
Hope you'll find your answers..
Cheers !!! -
Problem about user-defined resource in RAC
i do what doc says ,to create user-defined resource ,
[oracle@rac1 ~]$ crs_profile -create network1 -t application -a /opt/ora/product/10.2.0/crs_1/bin/usrvip -o oi=eth0,ov=192.168.40.221,on=255.255.255.0
[oracle@rac1 ~]$ crs_register network1
[root@rac1 bin]# ./crs_setperm network1 -o root
[root@rac1 bin]# ./crs_setperm network1 -u user:oracle:r-x
[oracle@rac1 ~]$ crs_start network1
Attempting to start `network1` on member `rac2`
Start of `network1` on member `rac2` succeeded.
$ crs_profile -create chk_slp -t application -B /opt/action_chkslp -d "test for crs" -r
network1 -l application2 -a /opt/chkslp.scr -o ci=5,ft=2,fi=12,ra=2
the command do not create /opt/chkslp.scr file ,so when i run crs_register chk_slp ,it will fail
[oracle@rac1 admin]$ crs_register chk_slp
Action Script `/opt/chkslp.scr` does not exist!
CRS-0213: Could not register resource 'chk_slp'.
i do not know why,anyone can helpHi Jigar,
when you have selected a project and a subproject your first screen
will be the personal menu of the LSMW. You will find here a step-by-step-wizard
which you have to execute in sequence. If a step is executed the cursor is automatically positioned on the next step.
Choose 'Maintain field mapping and conversion rules'.
If the mapping is displayed set the cursor on the field you want to edit.
Press the button 'Rule' on the button bar above the mapping.
You will get a Popup where you can select 'User-defined routine (reusable)' (that is the last radio button).
Regards,
Ralf
> But how to map input parameter of sub routine with
> source field. -
Questions about user-defined functions
Hello all,
I've got some questions about user-defined function in a message mapping:
1) How can I get the current date/time in format yyyy-mm-dd hh:mm:ss ? What is the java code for this?
2) I want to use the StreamTransformation constant TIME_SENT, only this is not in the right time-zone.
It is GMT and it should be CET (1 hour difference). How can I convert this in Java?
Can somebody help me with this?
Thanks in advance.
Kind regards,
Marco van IerselHi Marco,
If the date format is fixed as you have mentioned,please use this:
String test = "2009-03-27 23:15:30";
String test1 = test.substring(11,13);
if(!test1.equals("23"))
int a = Integer.parseInt(test1);
int b = a+1;
System.out.println("b"+b);
String c = Integer.toString(b);
test = test.substring(0,10)+" " + c + test.substring(13,19);
return test;
if(test1.equals("23"))
test = test.substring(0,10)+ " 00" + test.substring(13,19);
return test;
else return "";
Kindly let me know if this works.
Thanks.
Regards.
Shweta -
About user defined function in user defined rule
Hi,
I am wondering if I can use a user defined function in a user defined rule in oracle sem.. I've seen examples of user defined function used in sparql query filter clause in that dev. guide. However, I don't know if I can define a function in oracle sem. database and use it in the rule body or head. For example, I want to define a duration function that calculate the date difference between two dates. Then, I want to define a rule like this: event1 :has_start_date d1 and event1: has_end_date d2 and duration (24, d1,d2) then event1:date_satisfiable "yes". Does oracle support this kind of rule? Thank you very much.
HongHi Hong,
The user defined rules are quite similar to a CONSTRUCT SPARQL query, where the FILTER clause is implemented in SQL.
I think we have already written rules like you want :
You have to write a PL/SQL FUNCTION that returns a NUMBER (not a BOOLEAN, think you are in SQL) :
FUNCTION DURATION(HOURS INTEGER, D1 VARCHAR2, D2 VARCHAR2) RETURN INTEGER
IS
BEGIN
IF(.................)
THEN RETURN 1;
ELSE RETURN 0;
END IF;
END;
Maybe you will have to GRANT EXECUTE ON DURATION TO MDSYS.
Then include the following in the FILTER clause of the Rulebase "[owner].duration (24, TO_CHAR(d1),TO_CHAR(d2)) = 1"
Hope this helps. -
Hi,
Do anyone know what are user defined functions .. and what's the procedure to create a user defined function in sql or pl/sql ??
RegardsIs this Seshu or someone else asking with his login? The reason for this is earlier there was a post from some Param Reddy from Kurnool asking with his login.
If it is Seshu himself, I've seen you using the word 'function' a couple of time earlier.
Re: Comma separation
and
Re: Data Hiding
If you go and see in SQL Reference, you find two types of functions. SQL built-in and User-defined.
Cheers
Sarma. -
LSMW user-defined routine error
Hi,
I have a problem with the routines in the LSMW. This is want I am doing:
1. created a project & subproject.
2. copied 4-5 objects from another project
3. copied all the user routines.
4. ran the objects fine.
After a few days I have copied a new object from the old project and used one of the routines. It gives out the message "HANDLE is not defined under DATA". As I know, this is an lsmw global variable so it should work. This variable can be found in one of the routines. I deleted all the routines and copied them again and it work.
Today I needed a new object, copied it, and it gives again this error; recopied the subroutines...still, error persist.
Please help,
Thank you very much in advanced
LE: Is there any way to adapt your conversion program, after you made modifications to the field mapping?
Message was edited by:
Daniel BALTAHello Chris,
I have already done that and I still get this error, but only for this object. I have never declared this data "handle", but here is how 2 conversion programs look like (same project/subproject):
The program that works:
Counters
data:
g_cnt_UPLOAD type i.
Counter ct_xxxxxxxxxx: number of transferred records
data:
ct_IBIPEQUI type i,
cs_IBIPEQUI type i.
Global data definitions and data declarations
__GLOBAL_DATA__
DATA: objnr LIKE equi-objnr.
DATA: handle TYPE balloghndl.
INCLUDE zpmxi_appl_log.
DATA: BEGIN OF wa_tplnr OCCURS 0 ,
tplnr(50),
END OF wa_tplnr.
parameters:
p_filept no-display,
p_trfcpt no-display,
p_packge(5) type n no-display.
Select-option for wildcard value in file names
And the program that doesn't work:
Counter ct_xxxxxxxxxx: number of transferred records
data:
ct_BIKSSK type i,
cs_BIKSSK type i,
ct_BIAUSP type i,
cs_BIAUSP type i.
parameters:
p_filept no-display,
p_trfcpt no-display,
p_packge(5) type n no-display.
Select-option for wildcard value in file names
How do you explain this? -
Hi experts,
I added an UDF in BOM-Title and the type is link.
I created a BOM and assigned the UDF an attachment. but when I try to modify the UDF value, double click the field, it just pops up the attachment I assigned.
I can't modify or change the value. How to do that? Thanks....hi Gordon,
Yes, the UDF type is general with structure as link. and yes, if I double click the field, it pop up a File Open Window first time.
but once I assigned a file into the field, for example, a excel file. after somedays, if I want to change the file in that field again, I double click the field and it always pop up the excel file I stored last time, won't pop up the File Open Window anymore. I can't change the filename in the link field. are there any way to modify the value(file) in link UDF field? Thanks... -
Using user-defined transport recording routine with table maintenance view?
Hi,
I have a table that is maintained through a maintenance view. I need to record the changes to a dedicated transport object (not TABU) with my own recording routine instead of teh standard recording routine.Could someone tell me which/how the events can be used to achieve this?
Regards
RachanaHi Rajeev,
I have changed TMG to choose the option - User defined routine. And I have created a new transport object in SOBJ for the table. Is this enough to record the object to the transport as the object i defined instead of TABU? Do I need to write some subroutine for any view event to achieve this? Do you mean to use the menu option to include the object to a request?
I have a bigger problem where this view is actually part of a view cluster. Even in that case is teh above steps enough?
Regards
Rachana -
Regarding sqlserver user defined functions
Hi,
How to write user defined functions dynamically?
Please help me in any situationHi Bellam,
You post same question 2 times. Please avoid this practice on Forum, I
have merged the same thread into this thread.
As other post, dynamic SQL is not allowed in user defined functions (UDF), however, you can execute dynamic SQL store procedure with parameter. A user-defined function takes zero or more input parameters and returns either a scalar value or a table. There
is different between user-defined stored procedures and
user-defined function. User-defined functions do not support output parameters.
For more information, you can review the article about User-Defined Functions(UDF).
http://technet.microsoft.com/en-us/library/ms191007.aspx
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
User-defined include structures in FI
Hi all,
Can any body explain me about user-defined include structures in FI and how to do the enhancements..Plz suggest me by explaining with ABAP code. Plz tell me step by step.
Thanks,
JackHi Jack,
Here they hav explained clearly pls go through the link below USER DEFINED INCLUDE STRUCTURES
http://www.michaelmanagement.com/forum/uploads/20070621_164819_OSS_335065_-_Us.pdf
Datasourceenhancement
Below are the steps to enhace a data source.
log on to r/3
1..R/3sys, enter RSA7, SELECT UR DS(0FI_GL_4), SELECT DISPLAY ENTRIES,
2.Select Delta Update and Execute.
3.now u can see the records if at all they r available.
4.Now Check The Data in u2018smq1u2019 in R/3 and Execute.
5.Select ur Data source now.
6.Display Entries.
if at all any entries are there it display in the form of queues
if u find any where data , it must be scheduled to ur data target using Info packages.
Now let us see How to Enhance the Data source.
7.R/3, Enter RSA6., select ur Data source, then Click on enhance extract structure.
8. Now it populates a structure name. Like this u201CZADTFIGL_4u201D. Go with continue
9.Give the Description.
10. Under Component Give the Description of the fields u want to add Starting with ZZ
11. Under component type give the concerned Technical names OF RELEVANT FIELDS in r/3. AND u201CENTERu201D
12. SAVE
13.Give The Package go with save, request no go with continue.(or create a new request)
14. Now check and activate.
15. go back from current screen select ds and go with change. Message continue, Request no continue
16.now find ur newly added fields in ds, deselect hide flag and field only flag(check box)
17. So far u have added field to ur DS, now u need to populate Data to UR Newly Added fields by writing user exit.
Enter CMOD in R/3, give the project name , go with Create.
18. Give the Description and Save
log on to bw , rsa1-source systems, find ur ds replicate ds
Now Devolope Required fields in Bw
Add to ur communication structure,
apply the Transfer rules ,
Add to ur Target
Recreate Update rules.
Schedule the data..
Regards,
Marasa. -
About Setting - User Defined Fields
Hi everyone:
Well let me introduce a little of what i've been doing, at first i had this addon running just to satisfy some clients requirements, but now the requirements are different from one to another so i need to build an standard of it, for that do you know where or which is the table that saves the information contained on the form Settings- User Defined Fields? (for an specific form) where i found how the categories (CUDC) are settled to the _User fields of every form etc.
hope anyone knows about this.
thanks a lot
GabrielaHi
Look at table CUFD and UFD1 for the info you are looking for.
Hope this helps
Maybe you are looking for
-
Keep getting error message from 'Cron Daemon'
I have been running an Xserve G4 with Mac OS X Server 10.3.9 as a mail server and web server for several years now with no problems. Recently, however, I tried to set up a mailing list, which I had never done before. When I tried doing this, OS X aut
-
Error while passing parameters to a smart form
Hi all, I have created a simple Smartform where i am trying to pass two import parameters MATNR(like MAKT-MATNR) and MAKTX(MAKT-MAKTX).tHOUGH THE APPLICATION SEEMS TO RUN FINE BUT IT IS GIVING A WARNING ' Field MAKTX has no defined value '. Please he
-
How to create a multi-line table/column comment
Can someone tell me how to create a multi-line table or column comment? Apparently, the concatenate operator (||) does not work with the COMMENT statement. I've searched the Oracle manuals and couldn't find an answer. COMMENT ON TABLE sometbl IS 'i w
-
Creating sn IDOC for a new Material
Hi, I need to create a material in a system and send that material through ALE to some other system. All the ALE configurations are in place, I am able to create the material. Please let me know how to Create an IDOC with message type J3AMAT which ha
-
To day I visited a computer fair where a vendor was selling the K7N2-L for £76.00 and the K7N2G-L for £96.00, but didn't have the K7N2G-ILSR. I myself wanted to buy one of them but after thumbing both the manuals and peering hard at the motherboards