on 04-24-2007 7:28 PM
I want to create Business partners using LSMW (BAPI), for one field i want to write a subroutine. can anybody pls tell me how to write and call a subroutine(FORM..) for particular field in LSMW?
Thanks
hi
you can write the subroutines in the 6 th step of lsmw ....
<b>Maintain Fixed Values, Translations, User-Defined Routines</b>
for more info check the below links
http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
http://www.sap-img.com/sap-data-migration.htm
http://www.sapgenie.com/saptech/lsmw.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/7f/b6f45805b111d2b41c006094b944c8/content.htm
~~Guduri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lucky,
Write the following code in form Routines section under " Maintain Field Mapping and Conversion Rules"
1 * __FORM_ROUTINES__
2 * Convert date(sy-datum format) in date format set for the user
3 FORM convert_date USING cv_idate TYPE any
4 cv_datfm TYPE xudatfm
5 CHANGING cv_odate TYPE any.
6 DATA: l_idate TYPE char8, "input date
7 l_odate TYPE char10. "output date
8 l_idate = cv_idate.
9 CASE cv_datfm.
0 WHEN '1'.
1 CONCATENATE l_idate+6(2)
2 l_idate+4(2)
3 l_idate+0(4)
4 INTO l_odate.
5 WHEN '2' OR '3'.
6 CONCATENATE l_idate+4(2)
7 l_idate+6(2)
8 l_idate+0(4)
9 INTO l_odate.
0 WHEN OTHERS.
1 l_odate = l_idate.
2 ENDCASE.
3 cv_odate = l_odate.
4 ENDFORM. "convert_date
In the same section for the field which you wrote this FORM routine add the following code to it.
For ex.
BLDAT - Date (batch input)
Source: ZBBKPF-BLDAT (Date (batch input))
Code: PERFORM convert_date USING zbbkpf-bldat
v_datfm
CHANGING bbkpf-bldat.
Let me know if this helps.
Cheers.
Swanand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanx i will try this,
one more question, For one of the field depending upon the source field data i want to search in transaction table(table in SAP) and depending upup the search i want to put the value in target field, so can i get the transaction table data in internal table which will be global ... i mean the internal table will be filled initially, how to do this?
Thanks
Hi Lucky,
Write the following code in form Routines section under " Maintain Field Mapping and Conversion Rules"
1 * __FORM_ROUTINES__
2 * Convert date(sy-datum format) in date format set for the user
3 FORM convert_date USING cv_idate TYPE any
4 cv_datfm TYPE xudatfm
5 CHANGING cv_odate TYPE any.
6 DATA: l_idate TYPE char8, "input date
7 l_odate TYPE char10. "output date
8 l_idate = cv_idate.
9 CASE cv_datfm.
0 WHEN '1'.
1 CONCATENATE l_idate+6(2)
2 l_idate+4(2)
3 l_idate+0(4)
4 INTO l_odate.
5 WHEN '2' OR '3'.
6 CONCATENATE l_idate+4(2)
7 l_idate+6(2)
8 l_idate+0(4)
9 INTO l_odate.
0 WHEN OTHERS.
1 l_odate = l_idate.
2 ENDCASE.
3 cv_odate = l_odate.
4 ENDFORM. "convert_date
In the same section for the field which you wrote this FORM routine add the following code to it.
For ex.
BLDAT - Date (batch input)
Source: ZBBKPF-BLDAT (Date (batch input))
Code: PERFORM convert_date USING zbbkpf-bldat
v_datfm
CHANGING bbkpf-bldat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
In field mapping and conversion rules goto change mode and select layout.
check form routines(this will appear in the bottom of the window) and write your code in this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the following link:
http://www.sapbrain.com/TUTORIALS/TECHNICAL/LSMW_tutorial.html
Regards,
Bhaskar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.