Field length truncation ?

Hi Guys,
I have the xml data coming from SAP and it has the accounting document no field with 12 char long, but when i send this information to a 3rd party system and in the reponse i have the accounting doc number just with 10 char long. The database schema on the 3rd party system is designed for just 10 char.
The requirement is need to send this accounting document number back to SAP with the same 12 char as it has supplied.
any help would be appreciated
Thanks,
srini

HI,
While sending the filed from SAP to Third party system you need to reduce the field length to 10.
So Source filed --> Substring (Starting index, length (10)) -
>Target field.
Here you could truncate the intial 2 chars or last 2 chars of the filed.
You could have one suggestion to split the field in two different fileds while sending to target field.
Similarly for Target field ---> Source field
You need add suffix or prefix of 2 Chars may be 00 or any special chars.
IF you are spliting the filed in two seperate fields on Third party side then in reverse direction for sending it to SAP you could concatenate these two fields.
Thanks
Swarup

Similar Messages

  • SQL*Loader and "Variable length field was truncated"

    Hi,
    I'm experiencing this problem using SQL*Loader: Release 8.1.7.0.0
    Here is my control file (it's actually split into separate control and data files, but the result is the same)
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    first_id,
    second_id,
    third_id,
    language_code,
    display_text VARCHAR(2000)
    begindata
    2,1,1,"eng","Type of Investment Account"
    The TEST table is defined as:
    Name Null? Type
    FIRST_ID NOT NULL NUMBER(4)
    SECOND_ID NOT NULL NUMBER(4)
    THIRD_ID NOT NULL NUMBER(4)
    LANGUAGE_CODE NOT NULL CHAR(3)
    DISPLAY_TEXT VARCHAR2(2000)
    QUESTION_BLOB BLOB
    The log file displays:
    Record 1: Warning on table "USER"."TEST", column DISPLAY_TEXT
    Variable length field was truncated.
    And the results of the insert are:
    FIRST_ID SECOND_ID THIRD_ID LANGUAGE_CODE DISPLAY_TEXT
    2 1 1 eng ype of Investment Account"
    The language_code field is imported correctly, but display_text keeps the closing delimiter, and loses the first character of the string. In other words, it is interpreting the enclosing double quote and/or the delimiter, and truncating the first two characters.
    I've also tried the following:
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY '|'
    first_id,
    second_id,
    third_id,
    language_code,
    display_text VARCHAR(2000)
    begindata
    2|1|1|eng|Type of Investment Account
    In this case, display_text is imported as:
    pe of Investment Account
    In the log file, I get this table which seems odd as well - why is the display_text column shown as having length 2002 when I explicitly set it to 2000?
    Column Name Position Len Term Encl Datatype
    FIRST_ID FIRST * | O(") CHARACTER
    SECOND_ID NEXT * | O(") CHARACTER
    THIRD_ID NEXT * | O(") CHARACTER
    LANGUAGE_CODE NEXT 3 | O(") CHARACTER
    DISPLAY_TEXT NEXT 2002 VARCHAR
    Am I missing something totally obvious in my control and data files? I've played with various combinations of delimiters (commas vs '|'), trailing nullcols, optional enclosed etc.
    Any help would be greatly appreciated!

    Use CHAR instead aof VARCHAR
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
      first_id,
      second_id,
      third_id,
      language_code,
      display_text    CHAR(2000)
    )From the docu:
    A VARCHAR field is a length-value datatype.
    It consists of a binary length subfield followed by a character string of the specified length.
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#20324

  • Getting correct field length when creating formats for delimited flat files

    Using Data Services 3.2 to pull in tsv and Excel source files.
    When creating a new format for each file, DS tries to intelligently set the field size for each column. However, it seems to sample only a portion of the file. The end result is that it often determines too short a length for a field.
    Is there a way to force it to scan an entire file before it sets the field length? Or alternatively, how to get it to at least throw an error instead of silently truncating my data?

    I am not aware of any way to force DS to scan the whole file, or to log a warning when it truncates.  The field sizes DS sets by using a sample of the data is only really to give you a starting point, you need to try and determine the maximum possible lengths preferably from someone who understands the source of the data or through profiling.  But the profiling method will obviously only be based on the data you have at the time of profiling, new data added to the source later could exceed the field lengths.  The way I prefer to handle this is to set all the field lengths to longer than expected, eg. varchar(999) and then use a validation transform immediately after reading the file to check for any fields that exceed the maximum allowed for the target system and send these to an error file/table.

  • Custom IDOC type Segment-field length change

    Hello,
    We have a custom segment developed for triggering Outbouds. I'm tring to change the Field length of a deta element used for one of the fields in the segment.
    But after chaning the data element and activating it also, the changes are not effecting in WE31/ in the structure of the segment.
    Process I'm following:
    we31 <segment>
    ......cancel release
    Change data element and activate
    ....set release.
    Please suggest if something else can be done
    Thanks,
    Lucky.

    > @Sarvesh: The IDOC segment has been released.  I also re-imported the IDOC into XI - is that what you mean by 'reloaded'?
    No, re-importing in XI is different from reloading the metadata into ABAP stack of XI using IDX2 transaction. So if you have not done this, then this could be the main reason of truncating the length.
    Regards,
    Sarvesh

  • ANSI X12 EDI 850 V4010 - REF Field length Increase

    Hi,
    The standarad EDI V4010 definiation contains Segment:REF, Field:127, MaxLength:30 (ISA.GS.ST.REF:127), partner sending a EDI data with more than 30 characters for this field. As per their EDI guide lines the MaxLength allows upto 50 chars for this field.
    Have changed the field length from 30 to 50 chars in ANSI X12 850 V4010 message structure and re-generated EDI To XML mapping.When test the mapping in BIC tool, the EDI file is getting converted to EDI XML when the field value is more than 30 chars i.e upto 50 chars. Also Tested by giving more than 50 chars value for this field and it's failed to convert in BIC mapping tool saying 'The length of the field value is too big'.
    As the change working in BIC tool, generated sda file and deployed on PI QA system. While test the change after .sda file deployment the change of Field Length is not reflecting and it's only allowing upto 30 chars only., and more than 30 chars data for this field EDI files are failing.
    As the change working alone in BIC tool fine and not reflecting thefield length after sds file deployment. Any ideas about this issue and how to handle this requirement.
    Thanks
    Veera

    Hi John,
    If you see the documentation what you have given :
    Parameters:
    on: delimiters at the end do not appear
    off: delimiters at the end appear
    it clearly says the parameter is used for the delimiters, but not for truncating length of the fields in Seeburger.
    I'm not sure if you've ever used the BIC Mapping tool and what I'm really looking for is someone with experience in this area to give a solution that works for this question:
    By the way I have used the seeburger and this requirement we have done within XI because we have done all the rules within XI not in seeburger. But I will give a try with this requirement and will try to update you. Until unless I work with any of the issue I will not suggest. Even If I didnt I will try and then will suggest. Dont get me wrong.
    Cheers,
    John.

  • Extend data source field length

    Hallo experts,
    I wonder, what are the influences in BW if a R/3 data source field length changes.
    Example: size of VBAP customer field ZZ_TEXTis changed from 40 to 80 chars. Data are extracted via 2LIS_11_VAITM datasource.
    1) After replication of new datasource, what happens, if the infosource is not updated to the new size, is the field just truncated? Is the next delta load working or is an init load necessary?
    2) If fieldsize is updated in infosource and infoproviders too, what happens to the delta management?
    Thanks for your ideas!

    1) After replication of new datasource, what happens, if the infosource is not updated to the new size, is the field just truncated? Is the next delta load working or is an init load necessary?
    Ans : First of all I dont understand why you need to load text as transactional data.You could have mainitained a infoobject for customer and could have maintained text for it.This would have made your job simple.
    If above is not your case and if text is transaction data then ya if you dont update the infoobject with correct length it will be truncated.
    If its from now on the text is changed then you can change it now but I think it wont allow it to change as long as you delete it where ever its used.Hence you will need to reload.
    2) If fieldsize is updated in infosource and infoproviders too, what happens to the delta management?
    Ans : You may have to reload.
    Hope this helps.

  • Incoming Email Subject Field length increase

    Hi,
    In CRM 7.0,I need to increase the incoming email Subject Field length ,When i try to modify UI configuration,Subject fields are not enabled for configuration (Other fields in the same screen are enabled for modifications)..
    Please give your inputs whether incoming email Subject Field length  can be increased? if so,this should be done at UI level or mail form?
    Regards
    Shan

    Hi Prasenjit,
    Thanks for your interaction and response.
    Actually I can to find out views and class details in CRM 7.0 by using F2 key..
    The UI component is CRMCMP_CCS_EML and view is CRMCMP_CCS_EML/MailBody. The implementation class is ZL_CRMCMP_C_MAILBODY_IMPL. Since all the page attributes are string, There is a context class ZCL_CRMCMP_C_MAILBODY_CTXT, But no context node (Like you mentioned type CN as in *CN00, *CN01) within page attribute.
    The main issue am facing here is that couldnu2019t figure out where to start the debugging for inbound mails where the subject field is truncated. I usually process inbound mails from SOIN transaction.
    Moreover subject field can have more than 40 characters in outgoing mail, but the inbound mail subject field limited to 40 character and rest of them truncated.
    Hope you understand my area of concern and provide me your input.
    Regards,
    Shan

  • Fields Lengths (Mapping)

    Hi,
    My cenario is: POS calls RFC enabled function module from SAP trough EAI.
    So a function module Z* is called. When this function is Tested in SAP with transaction SE37 everything seems to be fine. There are one table returned and all the data is in correct fields.
    But, when this function is called trough EAI data is misaligned accordingly to difference of field lengths. For example ITEMS_OUT (used in my FM) table fields DOC_NUMBER in xml has 20 characters in function module 10, and so on.
    Do you have any idea? Where should be the problem? In mapping or should be a function module problem?
    Example:
    In xml file i get this:
    HEADERS_OUT>
    - <item>
    <DOC_NUMBER>00000007030040000000</DOC_NUMBER>
    <SOLD_TO>Test client Sales</SOLD_TO>
    <NAME1 />
    <NET_VAL_HD>0.000000000</NET_VAL_HD>
    <TAX_AMOUNT>0.000000000</TAX_AMOUNT>
    <BR_VAL_HD>0.000000000</BR_VAL_HD>
    <_FILLER />
    <CURRENCY />
    </item>
    </HEADERS_OUT>
    Regarding the DOC_NUMBER for example. In my RFC i have '0000000703', SOLD_TO = 0040000000; NAME1 = Test client Sales, and in xml is totally misaligned.
    Thanks
    BR

    Hi
    I think there is only 1 solution
    1) you will have to edit the XML structure so as to ristrich the field lengths to that needed by FM . As SAP will simply truncate the value if the length of the field is more than the required.
    The changes can be made in SAP FM also if the altered length is valid as per the SAP data type for that certain field.
    hope this helps
    Regards
    Nikhil

  • Field length change in Web Dynpro Components iView

    Hi,
    We are using SAP MDM Web Dynpro Components - Configuration Manager (NW7.3) to develop the UI. One of the issue while disply field is, Though field maintained in MDM has only 2 charaters UI that displays a full-screen-width field.
    I would like to display actual field length maintained in reposiroy for each field. Is it possible??
    Cheers,
    Rc

    This is closed.
    By mistake Raised Twice....I guess I need break

  • Changing field length of a standard field in standard table VBEP

    Hi,
    Please advice the possibility and the possible repercussions of changing field lengths in a standard table. Table in concern is VBEP.
    Thanks & Rgds,
    Pradeep

    No you cannot change the field length
    thanks
    G. Lakshmipathi

  • Type conflict when calling a function module (field length)

    Dear All,
                I am getting this following error while executing:  Type conflict when calling a function module (field length)
    This is piece of coding i have writern in my action button.
    method SEARCH_MATERIAL .
      data:
            node_mat_input TYPE REF TO  if_wd_context_node,
            node_mat_output TYPE REF TO if_wd_context_node,
            material TYPE BAPIMATDET-MATERIAL,
            itab TYPE TABLE OF BAPIMATDOA.
      node_mat_input = wd_context->get_child_node( 'NODE_MAT_INPUT' ).
      node_mat_output = wd_context->get_child_node( 'NODE_MAT_OUTPUT' ).
      node_mat_input->get_attribute( EXPORTING name = 'MATERIAL'
                                     IMPORTING value = material ).
      CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
        EXPORTING
          material                    = material
        PLANT                       = plant
        VALUATIONAREA               =
        VALUATIONTYPE               =
        MATERIAL_EVG                =
       IMPORTING
         MATERIAL_GENERAL_DATA       = itab
        RETURN                      =
        MATERIALPLANTDATA           =
        MATERIALVALUATIONDATA       =
      node_mat_output->bind_table( itab ).
    endmethod.
    Attributes are:
    Node name = INPUT its structure is BAPIMATDET
    INPUT attributes = MATERIAL of type BAPIMATDET-MATERIAL
    Thanks,
    Gopi.

    Hi Amit,
               I have used service call to fetch records from that bapi..
    The following is the code generated by service call:-
    METHOD execute_bapi_material_get_deta .
    declarations for context navigation
      DATA:
        node_bapi_material_get_de   TYPE REF TO if_wd_context_node,
         node_exporting   TYPE REF TO if_wd_context_node,
         node_material_general_dat   TYPE REF TO if_wd_context_node,
         node_importing   TYPE REF TO if_wd_context_node,
          lri_element    TYPE REF TO if_wd_context_element.
    declarations for fuba parameters
      data:
        stru_c_material_general_dat    TYPE if_componentcontroller=>element_material_general_dat.
      DATA:
        attr_material    TYPE bapimatdet-material,
        attr_plant    TYPE bapimatall-plant.
    get all involved child nodes
      node_bapi_material_get_de = wd_context->get_child_node( `BAPI_MATERIAL_GET_DE` ).
      node_exporting = node_bapi_material_get_de->get_child_node( `EXPORTING` ).
      node_material_general_dat = node_exporting->get_child_node( `MATERIAL_GENERAL_DAT` ).
      node_importing = node_bapi_material_get_de->get_child_node( `IMPORTING` ).
    get input from context
      node_importing->get_attribute(    EXPORTING      name = `MATERIAL`
                                                         IMPORTING      value = attr_material ).
      node_importing->get_attribute(  EXPORTING       name = `PLANT`
                                                              IMPORTING       value = attr_plant ).
    the invocation - errors are always fatal !!!
      CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
        EXPORTING
          material =                        attr_material
          plant =                           attr_plant
    "      valuationarea =                   wd_This->Valuationarea
    "      valuationtype =                   wd_This->Valuationtype
    "      material_Evg =                    wd_This->Material_Evg
        IMPORTING
          material_general_data =           stru_c_material_general_dat
    "      return =                          wd_This->Return
    "      materialplantdata =               wd_This->Materialplantdata
    "      materialvaluationdata =           wd_This->Materialvaluationdat
      node_material_general_dat->bind_structure( stru_c_material_general_dat[] ).
    ENDMETHOD.
                                 but the problem is I  am getting the following error while compiling...
    " stru_c_materialplantdata " is not an internal table - the " OCCOURS n"  specification is missing.
    Thanks,
    Gopi.
    Edited by: Yegalaivan on Nov 18, 2009 8:30 AM

  • How to create an infotype with one of its field length eq 1000.??

    hi ,
    i need to create a infotype where one of the field length is 1000 characters how do i achieve this. if i give more than 255 in the PS structure it will not allow. then how do i get a text field of 1000 chars in the screen ( which is an input field)

    You can use those function calls even inside a PA Infotype.. they just invoke the text ediotr table control.. I gave you the reference of the PD infotype 1002 just for an idea. I don't think you will able to meet your 1000 char reqt without using the text editor.
    ~Suresh

  • R/3 Field length 80, BW field max allowed 60

    Hi all,
    Field ABC is in R/3 production system.
    Its length is 80(CHAR).
    This field data is now to be extracted to BW.
    It is used in extract program and updated to an extract table(R/3), then this has be loaded into a master load(BW).
    But in BW the field length allowed is 60(Max).
    So how to get in this 80 char data into BW??
    Please let me know in detail.
    Also please share links pertaining to this if possible.
    Thanks,
    Sowrabh

    Hi Sowrabh,
    Create two Infoobjects one with length 60 and one with length 20.
    Now in transfer rules write routines for both.
    IOB1 = <r/3 field>+0(60)
    IOB2 = <r/3 field>+60(20)
    Regards,
    Mansi
    Edited by: mansi dandavate on Apr 23, 2009 6:23 PM

  • CATT - vendor/customer master address field length over

    Dear all,
       when use CATT to record vendor/customer master,the address some fields length are over recorded field length(ex. ADDR1_DATA-NAME4,ADDR1_DATA-STR_SUPPL3...etc)
    is there any config in CATT to solve this kind of problem?

    When you are doing your LSMW batch input recording, on selection screen (where you specify the sales org, distribution channel, division, account group, etc) please put a flag on "Use central address management" checkbox (SAPMF02D 0100 >  USE_ZAV).
    In this case you should be able to see and fill the desired fields.

  • I am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    i am trying to generate purchase order and i create a BAPI also which is active.
    But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    Hi,
    Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
    This is my CODE-
    FUNCTION ZBAPIPOTV2.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(POHD) TYPE  ZPOHD OPTIONAL
    *"     VALUE(POITEM) TYPE  ZPOITEM OPTIONAL
    *"  TABLES
    *"      RETURN STRUCTURE  BAPIRET1 OPTIONAL
    data: ls_pohd type bapimepoheader,
             ls_pohdx TYPE bapimepoheaderx,
             lt_poit TYPE TABLE OF bapimepoitem,
             lt_poitx TYPE TABLE OF bapimepoitemx,
             ls_poit TYPE bapimepoitem,
             ls_poitx TYPE bapimepoitemx.
       MOVE-CORRESPONDING pohd to ls_pohd.
       MOVE-CORRESPONDING poitem to ls_poit.
       ls_pohdx-comp_code = 'x'.
       ls_pohdx-doc_type = 'x'.
       ls_pohdx-vendor = 'x'.
       ls_pohdx-purch_org = 'x'.
       ls_pohdx-pur_group = 'x'.
       ls_poit-po_item = '00010'.
       APPEND ls_poit to lt_poit.
       ls_poitx-po_item = '00010'.
       ls_poitx-po_itemx = 'x'.
       ls_poitx-material = 'x'.
       ls_poitx-plant = 'x'.
       ls_poitx-quantity = 'x'.
       APPEND ls_poitx to lt_poitx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
       EXPORTING
         POHEADER                     = ls_pohd
        POHEADERX                    =  ls_pohdx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
    *   PARK_COMPLETE                =
    *   PARK_UNCOMPLETE              =
    * IMPORTING
    *   EXPPURCHASEORDER             =
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
      TABLES
        RETURN                       = return
        POITEM                       = lt_poit
        POITEMX                      = lt_poitx
    *   POADDRDELIVERY               =
    *   POSCHEDULE                   =
    *   POSCHEDULEX                  =
    *   POACCOUNT                    =
    *   POACCOUNTPROFITSEGMENT       =
    *   POACCOUNTX                   =
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
    *   POLIMITS                     =
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
    *   POSRVACCESSVALUES            =
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
    *   POCOMPONENTS                 =
    *   POCOMPONENTSX                =
    *   POSHIPPING                   =
    *   POSHIPPINGX                  =
    *   POSHIPPINGEXP                =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    *   INVPLANHEADER                =
    *   INVPLANHEADERX               =
    *   INVPLANITEM                  =
    *   INVPLANITEMX                 =
    ENDFUNCTION.
    i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". 

Maybe you are looking for