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

Increasing the length of Infoobject from 60 to 240 characters

Hi...

I want to increase the length of the infoobject from 60 to 240 characters, because that particular field in R/3 has texts with length 200 characters.

I want to create 4 infoobjects each of length 60, breakup the texts coming from R/3, in transfer rules, by writing the transfer routine for each infoobject stating, first 60 char of the r/3 field into the first infoobject and so on.

Did anyone write such routine? If so, can u provide me with the code?

Thanks a lot.

Sai.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Nov 20, 2005 at 12:14 PM

    Hi Sai,

    I usually prepare data before load cutting long texts into parts (in case of flat files I use Access for it, for DB Connect – create a view).

    But for future usage it would be usefull to do it in a routine.

    The task seemed to be very easy, but some important nuances have appeared.

    Note: I always prefer to keep parts of the long description in the long texts of separate chars. The reasons for this: Possibility to use time-dependent texts and texts with lowercase letters without problems with SIDs.

    So, I use one main object with child objects (which keep parts of the text) as attributes. The long text of the main object keeps the first 60 (or 59) symbols of the long description. In this case I create either main or child IOs not as CHAR 60, but as another type depending on the key field of the incoming description (for example, for a material description it may be its code). In the codes below I use 0ADDR_LINE1 - 0ADDR_LINE4 standard IOs for description parts – in order not to create 4 objects of CHAR 60 which I will not use.

    So, here is a result.

    For simplicity I assume that I have only 4 IOs like 0ADDR_LINEx and one IO as a main char.

    <b>1. Case of load from flat files</b>

    - Create a flexible infosource.

    - Put there the main char and 0ADDR_LINE1, 0ADDR_LINE2, 0ADDR_LINE3, 0ADDR_LINE4.

    - After assigning a source system the transfer structure is created automatically.

    - Since in the comm structure (which the system uses as a template for creation TS and TRs) the 0ADDR_LINE1 char has a length 60, we need to increase the length of this object upto 240 symbols in the TS.

    - Main char and 0ADDR_LINE1 wil have 1:1 mapping in transfer rules.

    - Mapping of the other chars depends on type of routine we use

    - In case of a start routine, all other chars are to be mapped as 1:1 also. Its important, because in the start routine (which works BEFORE the work of routines for particular chars) we create values for them and 1:1 mapping is placed these values into IOs. If these IOs are not mapped, then regardless of existing data for them in the data package, they’ll not be updated at all.

    The start routine code:

    FIELD-SYMBOLS <fs> TYPE TRANSFER_STRUCTURE.
    
    LOOP AT DATAPAK ASSIGNING <fs>.
      <fs>-ADDR_LINE2 = <fs>-ADDR_LINE1+60(60).
      <fs>-ADDR_LINE3 = <fs>-ADDR_LINE1+120(60).
      <fs>-ADDR_LINE4 = <fs>-ADDR_LINE1+180(60).
      MODIFY DATAPAK FROM <fs>.
    ENDLOOP.
    * abort <> 0 means skip whole data package !!!
      ABORT = 0.

    As an alternative it’s possible to create routines for ADDR_LINE2, ADDR_LINE3 and ADDR_LINE4.

    The code is very simple:

      RESULT =   TRAN_STRUCTURE-ADDR_LINE1+180(60).
    
    * returncode <> 0 means skip this record
      RETURNCODE = 0.
    * abort <> 0 means skip whole data package !!!
      ABORT = 0.

    This is for ADDR_LINE4. For the other IOs the offset will be 60 and 120.

    <b>2. Case of loading from R/3 or 3rd parties systems.</b>

    Routines for ADDR_LINE2, ADDR_LINE3 and ADDR_LINE4 is a straightforward solution. In case of a start routine, the source system should supply besides the long description 3 additional dummy fields with length 60. And mapping will be 1:1 for all fields.

    The rest is simple – inserting main and child IOs as data targets, creating update rules for them with proper mapping to incoming from a comm structure ADDR_LINEx values. Value of main IO should be set as a key field for all IOs.

    Best regards,

    Eugene

    Message was edited by: Eugene Khusainov

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Eugene!!!

      Very badly I need ur help with regard to the Long Text for my Survey Rpt for the field QUEST_TEXT.

      1)Which has a text field Length of 1000 but actually it is not that much required for my field length which wuld be less than 200 & as per ur logic mentioned...Is that I have to created tht field into 2 separate fields & do it as per ur idea in BW by creating it as attr.or with that one fields & i need to use the Std Addr Line field...for my rpt & do further steps.Pls Guide me with steps what I can do to get the long text.. ?????Anything to be done in source where i am getting the whole text.???But while loading data I got only one question loaded ...not sure due to dirty data or length prob...??

      2)Second one my basic Question with regard to the Field Length......if the source field len can be different or lesser than for target field length,can mapping be done for that??

      Revert to me ASAP as I need to finish in 2 days time & also I need to other front end work also.

      Thanks in advance

      Raji

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2005 at 12:19 PM

    In the transfer rule you will need 4 routines:

    <b>routine 1:</b>

    result = long_field(60).
    

    <b>routine 2:</b>

    result = long_field+60(60).
    

    <b>routine 3:</b>

    result = long_field+120(60).
    

    <b>routine 4:</b>

    result = long_field+180(20).
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 23, 2006 at 10:49 AM

    Hi ,can any one tell how to remove escape or extra characteristics when uploading flat file data to BW .

    for example

    Attn: Alvin Joseph.

    When RFG MM are created please default the BATCH status of the following Material groups as follows. Please note that SEMI-FGs should remain as-is (non-batch).

    BATCH MATL GRP DESCRIPTION

    Y RFG001000 NRE

    Y RFG002000 MPW

    Y RFG004000 WAFER

    Y RFG005000 DIE

    Y RFG006000 PROBE

    Y RFG007000 FINAL TEST

    N RFG001000 NRE

    N RFG004000 MASK

    N RFG008000 DESIGN SERVICES

    when uploading above data the data will come for 60 chars as one line & other data like

    BATCH MATL GRP DESCRIPTION

    will go to some other records ,so is there any solution for this .

    like should we write any routine ? if so give me the code.

    regards,

    prash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:11 AM

    Hi Sai,

    See this Blog .it is very heipfull for you.

    /people/sap.user72/blog/2006/05/27/long-texts-in-sap-bw-modeling

    Assign points if help full

    Rgds

    Bharath

    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.