Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

help on creating a generic ds by calling a FM ?

We have a requirement to get the char value name through FM. I need to create a new generic datasource which calls the FM " CONVERSION_EXIT_ATINN_INPUT" and fetches the result and pass it to BI.


Can anyone give me a sample program or link or document for the same. What this FM does is, just passes the ATINN values and gets the text /characteristic value for this field...so we need to pass the result of this FM to BI. I think its enough if we can just code the FM using import and export using this FM. Hope I am clear.


Thanks

DR

Former Member
replied

Hi,

maybe you got the option to append new fields to the existing DS and or change field entries by Userexit:

EXIT_SAPLRSAP_001

EXIT_SAPLRSAP_002

EXIT_SAPLRSAP_004

its not like you can create a extractor and put this Function Modul to be used for extraction.

you have to create your own function modul with a pre-defined interface for extraction and in this you can call CONVERSION_EXIT_ATINN_OUTPUT. so see what the interface has to be go to Transaction RSo2 and click F1 on field Function Modul.

you would have to write your own extract-function-modul. i dont know if this is what you want. because i have the feeling, that you want to somehow copy an existing extractor and change the output of a single field. ... field ATINN. maybe changing your existing extractor is the better choice. 

regards

Stefan Seeburger

here is the code of FM CONVERSION_EXIT_ATINN_OUTPUT:

FUNCTION CONVERSION_EXIT_ATINN_INPUT.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"       IMPORTING
*"             VALUE(INPUT)
*"       EXPORTING
*"             VALUE(OUTPUT)
*"----------------------------------------------------------------------

   DATA:
     L_ATINN LIKE CABN-ATINN,                "internal no of charact
     L_ATNAM LIKE CABN-ATNAM.                "name of characteristic

*........ read characteristic master ...................................

   if INPUT is initial.                                        "v 1391359
*   no input -> no conversion
*   SELECT on CABN would return first found entry
*   with initial ATNAM (overwritings)
     exit.
   endif.                                                      "^ 1391359

   CONDENSE INPUT NO-GAPS.
   L_ATNAM = INPUT.
   SELECT ATINN FROM CABN INTO L_ATINN
     WHERE ATNAM EQ L_ATNAM.
     EXIT.
   ENDSELECT.

*........ set internal number ..........................................

   IF SY-SUBRC IS INITIAL.
     OUTPUT = L_ATINN.
   ELSE.
     OUTPUT = INPUT.
   ENDIF.

ENDFUNCTION.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question