Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI/RFC function module - accessing with third party tool

nicolae_foldesi
Explorer
0 Likes
4,307

Hello everyone,

I`m using XTRACTIS+SSIS tool to extract data from SAP ERP R/3 platform and for most of my data i`m reading transparent tables and extracting into my DataWarehouse for further ETL processes.

So far so good, but now i received a business request to read out all Long text Description for all of my materials from material master (MARA).

I have tried to use some BAPI modules but with no luck (e.g. BAPI_MATERIAL_GET_ALL ).

Can any of you experts provide me with a name of a BAPI to be able to access the long text description of material by imputing the MATNR field and receive the long text description obtain directly in ABAP by accessing the READ_TEXT function?

I apologize for posting this question into ABAP Development section!

Best regards,

Nicolae Foldesi

16 REPLIES 16
Read only

SimoneMilesi
Active Contributor
0 Likes
3,583

Hi Nicolae,

as first step, ask your ABAP collegue, if you have one: he should know the answer.

Did you check BAPI_MATERIAL_GETALL? It has a nice returning table MATERIALTEXT with all the long texts as well MATERIALDESCRIPTION with all the long descriptions

Read only

0 Likes
3,583

Hi Simone,

Yes i did checked this BAPI and the only thing that doesn't return is the long text description.

I`ll ask and ABAP colleague, (even if i don`t have one - but i`ll find one), thank you!

It would be much easier directly in ABAP code of course, but i need the information inserted into my DataWarehouse and converted into nvarchar or text or any other format human readable - exact like you can see in MM03->AditionalData->Basic Data Text

Thanks for the reply!

Read only

0 Likes
3,583

It's strange that the table with long text is empty: do you pass/filter any language?

Read only

0 Likes
3,583

Hi Simone,

              Nicolae is trying to access 'Basis Data Text' which I guess the BAPI won't provide. As per my understanding, no BAPI is provided for it. So a BAPI can be created and READ_TEXT can be called inside.

Regards,

Amit Kumar

Read only

0 Likes
3,583

I`ve checked table STXL and i have data inhere on two different languages. And yes i have looped for all languages.

I`ve also got some other documentation for this BAPI module and i saw table the table where from this bapi read the long text is "materiallongtext = " bapi_mltx_ga Long Texts"  and in MLTX i don`t have any data, this is not even activated in Dictionary.

Read only

0 Likes
3,583

Maybe you are right Amit, but unfortunately i cant ask from the SAP guys to create me an Z bapi to read this text. I have to get solved without them, unfortunately.

Read only

0 Likes
3,583

My fault, on "Basis data Text" i understood the long text under BASIC DATA tab, the material descriptions.

So dumb sometimes!

Read only

0 Likes
3,583

Hi Simone,

              You followed the right procedure to understand the requirement. But,Sometimes, I do mind reading very fast which I should avoid. I have started contributing recently, so learning it.

Regards,

Amit Kumar

Read only

Former Member
0 Likes
3,583

Hi


---------------------------


BAPI_MATERIAL_GET_ALL will give you all long text descriptions for the material


Just put Material number in parameter MATERIAL and retrieve long texts from table MATERIALLONGTEXT


-----------------


Or using READ_TEXT Function module with


NAME =  Material number in internal format ( char18 )

LANGUANGE = SY-LANGU

OBJECT  =  'MATERIAL'

ID = 'GRUN' or 'BEST' ... [  see the different values for iD in table TTXID ]


---------------------


Thanks

Read only

0 Likes
3,583

If you read the initial thread, the OP says clearly he cannot use READ_TEXT since he's invoking the FM an external system so he needs an RFC function and READ_TEXT isn't.

Read only

0 Likes
3,582

Hi Hichma,

I`ve read your answer and tried again with BAPI_MATERIAL_GET_ALL and exactly the long text misses to return - the other data it returns OK.

All the options are filled OK but the return is without LONG Desc

Anyway thanks for the reply!

Read only

0 Likes
3,581

If you looking for basic data text in MM03 then use Function Module READ_TEXT with

  • CLIENT          =  sy-mandt
  • ID                  =  'GRUN'
  • LANGUAGE    =       EN
  • NAME            =  material number in intern format (CHAR18 ) Add leading 0 if you have to
  • OBJECT         =    ' MATERIAL'

Thanks

Read only

0 Likes
3,581

Yes indeed, you are perfectly right, but with my third party connector XTRACTIS from Theobald i cannot use the function itself i have to pass in a BAPI or a RFC Function module.

Read only

Former Member
0 Likes
3,581

This message was moderated.

Read only

0 Likes
3,581

Why you suggest to create a Z RFC function when there is already a standard BAPI?

Read only

nicolae_foldesi
Explorer
0 Likes
3,581

I guess that the correct answer is "Ask an ABAP colleague"