Skip to Content
0
Dec 31, 2005 at 06:14 AM

Function module which gives class name

568 Views

Hi All,

I have used classes in my rpogram.

I want to save excise data.

FM 'YMB_POST_GOODS_MOVEMENT' is working fine...

CALL FUNCTION 'YMB_POST_GOODS_MOVEMENT'

  • EXPORTING

  • XBLNR_SD =

IMPORTING

EMKPF = LS_EMKPF

TABLES

XMSEG = LT_MSEG

XMKPF = LS_MKPF

XMBEW = LT_MBEW

XMARD = LT_MARD

XMARC = LT_MARC

XEKBE = LT_EKBE

XVM07M = LS_VM07M

XMDCP = LT_MDCP

XPBAT = LT_PBAT

XMCMSEG = LT_MCMSEG

XMCBEST = LT_MCBEST

XMARV = LT_MARV.

ES_EMKPF_OLD = LS_EMKPF.

IF LS_EMKPF-MBLNR IS INITIAL.

MESSAGE S514(L9) WITH ES_EMKPF_OLD-MSGV1.

ELSE.

SET PARAMETER ID 'MBN' FIELD LS_EMKPF-MBLNR.

SET PARAMETER ID 'MJA' FIELD LS_EMKPF-MJAHR.

MESSAGE S012(YM01) WITH 'Material document & posted' LS_EMKPF-MBLNR.

  • Send message with the new document

LS_KEY-MAT_DOC = LS_EMKPF-MBLNR.

LS_KEY-DOC_YEAR = LS_EMKPF-MJAHR.

  • CALL METHOD NEW_DOCUMENT

  • EXPORTING

I_REFDOC = 'R02'.

I_FROM_POSTING = ABAP_TRUE.

IS_KEY = LS_KEY.

************************************************************************

  • Send a message that a new document has been inserted

************************************************************************

DATA:

I_SYSTEM_MESSAGE TYPE ABAP_BOOL VALUE ' ',

I_DELAYED TYPE ABAP_BOOL VALUE ' ',

I_LATE_UPDATE TYPE ABAP_BOOL VALUE ' ',

I_MESSAGE_ID TYPE TY_MESSAGE_ID,

I_IREF_SENDER TYPE REF TO LIF_MIGO_FRAME,

  • ME TYPE REF TO LCL_MIGO_CONTROLAREA,

P_QUEUE_MODE TYPE ABAP_BOOL,

L_ID TYPE ES_OBJECT_ID,

L_TYP TYPE OJ_NAME,

BEGIN OF LS_MATDOC,

MBLNR TYPE MBLNR,

MJAHR TYPE MJAHR,

END OF LS_MATDOC.

  • Send around a message with the goods news

LS_MESSAGE-DATA1 = I_REFDOC.

IF I_FROM_POSTING = ABAP_TRUE.

LS_MESSAGE-DATA2 = 'POSTED'.

ENDIF.

GET REFERENCE OF IS_KEY INTO LS_MESSAGE-DREF.

  • me = '2<\FUNCTION-POOL=MIGO\CLASS=LCL_MIGO_KERNEL>'.

CALL METHOD LCL_MIGO_FRAME=>MESSAGE_SEND

EXPORTING

  • I_IREF_SENDER = me

I_MESSAGE_ID = 'NEW_DOCUMENT'

IS_MESSAGE = LS_MESSAGE.

My problem is that I haven't getting value of me.

In MIGO it gives

<u>'2<\FUNCTION-POOL=MIGO\CLASS=LCL_MIGO_KERNEL>'</u>

Class CLASS=LCL_MIGO_KERNEL has been used in FM YMB_post_goods_Movement

It doesn't take above value directly by assigning variable.

Can any one give me idea how to get it....

PLease help Iam new in CLasses And Methods

Thanks In Advance,

Dhanu.