Skip to Content
author's profile photo Former Member
Former Member

Joing VBELN and POSNR for fetching data fron STXH table

HI All,

I have to get data from FM Read_Text.

For the input i have to pass NAME, OBJECT,ID,LANG etc field after fetching record fron STXH table.

I have with me VBELN and POSNR values from VBAP table.

Bu to fetch records from STXH table i need to pass TDNAME as VBELN+POSNR.

means if VBELN = 10000000124

and POSNR = 12345

then i have to pass TDNAME as 1000000012412345 for fetching records from STXH table.

Please help how to join these two fields .

Or else please suggest an alternative approach.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2010 at 02:46 PM

    concatenate VBAP-VBELN VBAP-POSNR into LV_TDNAME !!!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2010 at 06:41 PM

    Hi Mayank,

    You need to delcare a variable of type TDNAME.

    Then convert your VBELN & POSNR to the OUTPUT FORMAT using ALPHA conversion FM.

    And then concatenate them both into the variable you declared, and then pass it.

    e.g. your vbeln # is 100012345, the ALPHA conversion will change that into 0100012345 and if your POSNR is 1234, it will change it to 001234 and then you need to concatenate them into the new variable.

    Thanks & Regards,

    Sandip Kamdar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2010 at 03:07 PM

    Hi Mayank,

    Sandip is correct, you will have to do something like this,

    DATA: TDNAME TYPE STXH-TDNAME.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    input = VBELN

    IMPORTING

    output = VBELN.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    input = POSNR

    IMPORTING

    output = POSNR.

    CONCATENATE VBELN POSNR INTO TDNAME.

    This will do it for you.

    Hope this helps you,

    Regards,

    Abhijit G. Borkar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.