07-19-2007 3:23 PM
Hello guys iam migrating open ar line items using lsmwand i need to create reconciliation key automatically so iam using below code which is working fine in abap editor but i inserted in the lsmw abap code block at step 5 mapping fields iam getting error as that function module does not exits .can any body go through the code and give me suggestion.your will be greatly appreciate.
types: begin of ty_fikey,
fikey type fikey_kk,
resob type resob_kk,
end of ty_fikey.
data: wa_fikey type ty_fikey.
CALL FUNCTION 'FKK_FIKEY_CHECK'
EXPORTING
I_FIKEY = 'jana56481'
I_OPEN_ON_REQUEST =
I_OPEN_WITHOUT_DIALOG =
I_FOR_MASS_POSTING =
I_RESOB = '24 '
I_RESKY = ' '
I_NON_EXISTING_ALLOWED = ' '
I_FOR_POSTING_IN_UPD = ' '
EXCEPTIONS
NON_EXISTING = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
select single fikey resob from dfkksumc into corresponding fields of wa_fikey where resob = '24'.
e1bpdfkkko-fikey = wa_fikey-fikey.
Regards
Janapathi
07-19-2007 5:11 PM
Hi,
U need not write code in lsmw u need to put fields and their length in that section
i.e;
fikey_kk
resob_kk
I hope u r clear but pls refer documentation for the same so as to get clear idea.
If u need document pls tell me.
pls reward points.
Regards,
Ameet
07-19-2007 5:17 PM
Hi,
Refer link:
<a href="http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc">http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc</a>
Pls do reward points.
Regards,
Ameet
07-19-2007 6:15 PM
thanks amit .what do u do if u want to write logic ?u need to write code right?i have done some objects writing code at step 5 but never used functions in it.this is first time i have to use it.guys pls help me its urgent.
Regards
Janapathi
07-19-2007 7:12 PM
Hi,
I have used the statement CALL FUNCTION '<i>function_module_name</i>' in LSMW. So, there is no problem with that.
By the way, that FM has no importing parameters, i.e. you are not going to get anything back from that FM, then what is the use of calling it in your LSMW ?
Regards,
Mukul
07-19-2007 8:42 PM
create subroutine in step 'Maintain Fixed Values, Translations, User-Defined Routines' and call that routine from the step in mapping. call your function module within the routine.
That should solve your problem.
Bijay
07-20-2007 5:47 AM
Hi,
If at all u want to insert code insert a PERFORM statement or some function module as an exit in standard lsmw program.
I have never used it but exactly i do not get wat do u need.
Pls reward points.
For any further qury i am always on SDN.
Regards,
Ameet