Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8704

Re: Need to write the code at transfer rules.

$
0
0

Hi Sudheer reddy,

 

 

Create the Class with PU_HANDLE_SPL_CHARCTER method with the following parameters

 

Capture.PNG

 

write the following code in above method

 

 

method PU_HANDLE_SPL_CHARCTER.

 

   DATA: lo_d_length TYPE i,

         lo_d_char(1)   TYPE c,

         lo_d_index  TYPE i.

 

   TRANSLATE g_object TO UPPER CASE.

   lo_d_length = STRLEN( g_object ).

*

   DO lo_d_length TIMES.

     lo_d_index = sy-index - 1.

     lo_d_char = g_object+lo_d_index(1).

 

     CALL FUNCTION 'RSKC_CHAVL_OF_IOBJ_CHECK'

       EXPORTING

         i_chavl           = lo_d_char

         i_iobjnm          = i_object

       EXCEPTIONS

         chavl_not_allowed = 1.

 

     IF sy-subrc NE 0.

       CLEAR g_object+lo_d_index(1).

     ELSE.

       g_object+lo_d_index(1) = lo_d_char.

     ENDIF.

   ENDDO.

 

   TRANSLATE g_object TO UPPER CASE.

 

endmethod.

 

 

crate a transform rule and write the following code.

 

DATA:g_obj TYPE REF TO ZCL_0MATERIAL_BISMT.

CONSTANTS c_ref TYPE /SAPDMC/LS_SRCSTR VALUE 'your info object name'.

DATA : g_object TYPE /SAPDMC/LS_SRCSTR.

CREATE OBJECT g_obj.

 

 

  g_object = SOURCE_FIELDS-/BIC/<your quantity field>.

 

     CALL METHOD g_obj->pu_handle_spl_charcter

       EXPORTING

         i_object = c_ref

       CHANGING

         g_object = g_object.

 

     RESULT = g_object.

 

 

 

hope your problem will solve.

 

 

Regards,

Gurunath







Viewing all articles
Browse latest Browse all 8704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>