‎2006 Oct 30 5:16 AM
Hi Experts,
In Classes and Methods i got one requirement like this , Please respond it.
I have to create the method , where class is already defined(ZCL_CONFIGURABLE_ITEM )
Create Method: IS_SEQUENCE_NOT_TO_PRINT .
Class name :ZCL_CONFIGURABLE_ITEM
They had given me example logic also. But iam not able to do this because i have no idea on classes and methods.
Please see this example and respond me .
Create Method: IS_SEQUENCE_NOT_TO_PRINT . This must be a value method in class ZCL_CONFIGURABLE_ITEM , passing document number VBDKR-VBELN that returns a parameter value: X = True, Blank = false.
GET BILLTO_PARTNER customer number for the document (reading VBPA where VBELN = document number VBDKR-VBELN and partner PARVW = RE / BP)Read table KNA1 to get field KNA1-KATR6 where KUNNR equals Billto partner, and fields VBDKR-VKORG, VBDKR-VTWEG, VBDKR-SPART, Store first character of field KNA1-KATR6 in a work field e.g. W_ KATR6.
Add the entry below to the ZLITERAL table in all clients
Read the records from ZLITERAL table (reading key1 = C_ZLIT_GENOSYS_KEY, and key2 = C_KATR6_1) where C_KATR6_1 = attribute on class, with value = KATR6_1 . You must add this attribute on the class. Populate the internal table L_ZLITERAL_TAB type ZLITERAL_TAB_TYPE.
‎2006 Oct 30 5:27 AM
Hi,
You can create the method from the CLASS BUILDER. SE24. There navigate to methods tab and enter you method name. Then select visibility public or private.
Then click on the parameters button to add parameters to the method. Selec IMPORT, EXPORT or RETURNING parameter for the function.
Regards,
Sesh