Errors in Transfer Routine for 0MATERIAL_ATTR

I created a transfer routine on the 0Material_attr upload that needs to populate an attribute called Z_CPFX.
Problem is, I need to look at the material number, material group, and the Material Description, and then populate the result based on what I find.
I am new to using ABAP in these routines, so any help would be appreciated.  I will award points.
The error I keep getting is E:Field "TRAN_STRUCTURE-MATNR" unknown.
Could somebody take a look at my ABAP and advise what I'm doing wrong?
Thank you.
Ken
$$ begin of routine - insert your code only below this line        -
DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
  DATA:   X_DESCRIPTION TYPE TABLE OF /BI0/TMATERIAL.       " KC01
    select  *
          into CORRESPONDING FIELDS of Table X_DESCRIPTION
         from /BI0/TMATERIAL
        where tran_structure-matnr = /BI0/TMATERIAL-matnr.
  IF MATKL between 765 and 770.
    RESULT = 'MAPOO'.
  ELSEIF MATNR(1) = 'X'.
    RESULT = 'MAPOO'.
  ELSEIF MATNR(1) <> 'X'.
    AND (MATKL = '750'
          OR MATKL = '751'
          or MATKL = '755'
    RESULT = 'MAPWK'.
  ELSEIF
    (MATKL = '756'
    or MATKL = '760'
    or MATKL = '761'
    and X_DESCRIPTION-TXTMD co 'renew'.
    RESULT = 'MAPRK'.
  ELSEIF
  (MATKL = '756'
  or MATKL = '760'
  or MATKL = '761'
  and X_DESCRIPTION-TXTMD !co 'renew'.
    RESULT = 'MAPMM'.
  ELSE.
    RESULT = space.
  ENDIF.
returncode <> 0 means skip this record
  RETURNCODE = 0.
abort <> 0 means skip whole data package !!!
  ABORT = 0.
$$ end of routine - insert your code only before this line         -
ENDFORM.

Hi Kenneth,
/BI0/TMATERIAL is the text table for 0material. If you are trying to get all the data from text table, please correct your select statement as below (text table does not contain the attributes. you might need to chenge the selection table to its attribute tables):
select *
into CORRESPONDING FIELDS of Table X_DESCRIPTION
from /BI0/TMATERIAL
where tran_structure-matnr = /BI0/TMATERIAL-MATERIAL.
I also see that some of your syntaxes are wrong:
eg: IF MATKL between 765 and 770. ==>
IF( ( MATKL > 765 ) and ( MATKL < 770 ) ).
Please look into the syntaxes of other statements as well.

Similar Messages

  • Error while activating transfer structure for 0MATERIAL_ATTR

    I am trying to activate the transfer rules of 0MATERIAL_ATTR, but when activating the process end with the following message:
    Error generating program
    Message no. RSAR245
    Diagnosis
    An error occurred in the program generation:
    Program / Template:   RSTMPL80
    Error code / Action: 6
    Row:        1,792
    Message:    The data object "P_S_COMM" has no component called
    I cannot activate the transfer rules of 0MATERIAL_ATTR and 0MATERIAL_TEXT because of the same problem. Could anyone please help me...
    Thanks in advance for your valuable help.
    Regards
    Carlos España.

    Ron Silberstein:
    I really appreciate your help, thank you very much.
    I saw your profile, and i saw that you are an expert in BI.
    Congratulations, your help was very important for me.
    CONTINUE HELPING OTHER PEOPLE!!!!! T H A N K S!!
    God Bless you.
    Regards
    Carlos España.

  • Error in Transfer rules for 0REQESTER

    Hi,
    I have a routine in transfer rules for standard Infosource 2LIS_02_ITM for 0REQESTER.
    routine goes like this
    INCLUDE rsbctbbp_transfer_r3.
    TABLES: srm_proj_contr.
    DATA:   l_s_errorlog TYPE rssm_s_errorlog_int,
              l_text TYPE string.
    data: l_rc type i.
    perform bbp_get_requester using TRAN_STRUCTURE-afnam
                                      RECORD_NO
                                      g_s_minfo
                                 changing RESULT
                                     g_t_errorlog
                                      l_rc.
    returncode <> 0 means skip this record
      RETURNCODE = l_rc.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    ENDFORM.
    FORM INVERT_REQUESTER
      USING    I_RT_CHAVL_CS      TYPE RSARC_RT_CHAVL
               I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
      CHANGING C_T_SELECTION      TYPE SBIWA_T_SELECT
               E_EXACT            TYPE RS_BOOL.
    $$ begin of inverse routine - insert your code only below this line-
      DATA:
        L_S_SELECTION LIKE LINE OF C_T_SELECTION.
    An empty selection means all values
      CLEAR C_T_SELECTION.
      L_S_SELECTION-FIELDNM = 'AFNAM'.
    Selection of all values may be not exact
      E_EXACT = RS_C_FALSE.
    $$ end of inverse routine - insert your code only before this line -
    ENDFORM.
    this routine does not have any errors.
    when i load the data data wil not be loaded and i will get the following error messege in details
    Record 1 :No value found for attribute 0REQESTER for InfoObject 0USERNAME =
    can anybody suggest me plz regarading this.
    Thanks & Regards,
    Vijaya

    Thanks!

  • Error in Transfer posting for movement type 303

    Hi Sir,
    I am getting following error while doing Transfer posting for movement type 303 thru BAPI_GOODSMVT_CREATE
    Error in Function:
    Order    not found or not permitted for Goods Movement.
    I am passiing all mandatory parameter for it as per BAPI Documentaion in tcode BAPI
    Transfer posting
    Transfer posting without reference to a reservation
    The following fields must be populated:
    Material number
    Plant
    Storage location
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    If I am doing manually by MB1B tcode, it is successfully done.......here its not asking any ORDER No...
    Please help me .........
    Regards,
    Krishan

    I'm not sure what you're system set up is...   So I'd suggest looking at everything you enter on the screen and then checking to make sure you are passing all the information in the BAPI.
    With that said our system does require posting date, and batch.  You might check that.   Also check that you've included all the required information in the header.
    Did you use the same data when you tried to process the BAPI that you used when you tried to do MB1B manually?

  • Syntax error in Transfer routine

    Hai all,
               I am trying to write a routine for an object in the datasource trasnfer structure. I am getting a error. The code and the error as as follows.
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
    SELECT SINGLE * FROM /BI0/PCOMP_CODE
        WHERE COMP_CODE     = TRAN_STRUCTURE-BUKRS AND
              OBJVERS       = 'A'.
      IF SY-SUBRC           = 0.
         RESULT = /BI0/PCOMP_CODE-CHRT_ACCTS.
      ENDIF.
    returncode <> 0 means skip this record
      RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    The error message I am getting is
    "E:A target area must be declared either explicitly with an INTO clause or implicitly with a TABLES statement."
                The cursor is going to the line " SELECT SINGLE *.....". 
             I guess its pointing where the mistake is. It says the target must be specified. But I already specified the target.
    I appreciate any kind of help.
    Thanks a lot.

    Hi,
    You didn't provide a INTO class for the select statement.
    DATA : BEGIN OF LCL_COMPCODE.
    DATA : INCLUDE STRUCTURE /BI0/PCOMP_CODE.
    DATA : END OF LCL_COMPCODE.
    SELECT SINGLE * FROM /BI0/PCOMP_CODE
    WHERE COMP_CODE = TRAN_STRUCTURE-BUKRS AND
    OBJVERS = 'A'
    INTO LCL_COMPCODE.
    Loop at the LCL_COMPCODE to retrieve the data.
    Thank you
    Arun

  • Error :-Cancel transfer order for item

    Hi,
    The material has batch split and we are facing an error while cancelling transfer order for one item.Now here 4 items are there out of which item 1 is batch split i am able to cancel transfer order for 2,3 and 4 item whereas in item 1,sub category 10 (pick quantity is grade out) can you suggest why i am not able to cancel it.
    Thanks,
    Dharmesh

    Hello,
    Since item 10 is covered via WM hence the picking qty is grayed out.
    You can go the document flow and find out for item 10 what is the TO no and also if its  completed ( confirmed) or not. If its confirmed, then you cant cancel the TO.
    If its no you can cancel the TO via LT15.
    Thanks,

  • Transfer Routine for Master Data

    I want to write a transfer routine to load the text.
    I want to load Short text as some word 'EXACT' in the T-table, if the value of that attribute is blank. While loading the master data.
    Eg: In 0Equipment there is some attribute say ZEQUI .
         I want a routine where: If ZEQUI is blank then load the Short text as 'EXACT'
    Please its urgent, can anybody tell me how to do this & some sample code....
    Thanks
    Regards,
    Maddy

    Texts are language specific so you will need to decide on what languages you want 'EXACT' to appear.
    Once you have that done, you can create a flexible update and write a transfer or update rule to read the attributes before populating the text table.
    some pseudo code would be:
    1) Select equipment and attributes into internal table
    2) Read internal table for specific record
    3) determine if the attribute field is blank
    4) If blank, return 'EXACT'

  • Urgent : Error in transfer rule of 0material_attr

    Hello,
    We are trying to activate transfer rules of InfoSource 0MATERIAL_ATTR
    in BW Quality System. But We are getting the following error message:
    ================================================
    Error when generating the message type for transfer
    structure /BIC/CCBA0MATERIAL_ATTR
    Message no. R3115
    Diagnosis
    An error occurred in the generation of the ALE message type for the
    transfer of changes to a certain basic characteristic.
    System response
    The transfer of changes to this basic characteristic cannot be carried
    out.
    Procedure
    Errors in the number range object for the naming of the message type or
    errors with the entries in the respective ALE tables could be the
    possible cause.
    ======================================================
    Pl. help me to resolve the issue

    Hi,
    Use tcode RSRV to repair object. Goto RSRV>All Combined test>Master data-->Check Master data for a char .
    hope it helps...
    regards,
    raju

  • Syntax error during transport on valid transfer routines

    Dear All,
    We have some routines in a tranfer structure that are valid and working just fine in DEV.  But when we transport them to QA we get the following error message :-
    Start of the after-import method for object type R3TR ISTS (Activation Mode)                
    Transfer structure 6DB_V_BW_EPISODE_AD activated under the name 6DB_V_BW_EPISODE_AD         
    It is not necessary to copy dependent objects for transfer structure 6DB_V_BW_EPISODE_AD    
    Syntax error in transfer routine for InfoObject OPEN_DAT                                    
    Activating Transfer Rules 6DB_V_BW_EPISODE_AD ...                                           
    47 Transfer Rule(s) of the transfer structure 6DB_V_BW_EPISODE_AD removed from control table
    53 InfoObject(s) of the transfer structure 6DB_V_BW_EPISODE_AD removed from control table   
    Formulas have been saved                                                                    
    Syntax error in transfer routine for InfoObject OPEN_DAT
    If we remove all the routines the activation works just fine even though our routines are valid and working just fine in DEV.
    Can anyone explain this as this is becoming quite urgent now ?
    Thanks in advance.
    Craig

    Hi Oliver
    I work with Craig. In response to your question, what he means is that all objects independantly have been transported ok, apart from the transfer rules. If you look at the table RSTSRULES you will see a column called CONVROUT_L.
    In our Dev system this field contains the BW generated rule code. Eg.
    45GEGC5I66GA9Z5G4KFDDRIK4 against the Transfer structure. When the after import process runs, it uses the contents of this table together with the contents of the RSAABAP table which contains the code and creates the transfer rule program.
    In RSAABAP we have the following code for CODEID '45GEGC5I66GA9Z5G4KFDDRIK4'
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
    CHECK NOT &TS&-opened_date IS INITIAL.
    IF &TS&-opened_date < '19000101'.
    &RS& = '19900101'.
    ELSEIF &TS&-opened_date > '29990101'.
    &RS& = '19900101'.
    ELSE.
    &RS& = &TS&-opened_date.
    ENDIF.
    returncode <> 0 means skip this record
    &RE& = 0.
    abort <> 0 means skip whole data package !!!
    &AB& = 0.
    In our QA system the column is blank because of the wierd Syntax problem when generating the program, therefore the transfer rules dont get activated.
    As you can see there is no problem with the ABAP.
    Regards
    Mark

  • Info object transfer routine

    Hi,
    i had infoobject ZEBAY01 and need to write global transfer routine for this infoobject. Now the infoobject value is comming 0000999999 but the business wants the output value as 009999. They want to see output value as 6digit like (009999).can someone help me how to write code here
    ROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RSD, RSARC, RSARR.
    TYPES: DE_ZEBAY01(000015) TYPE C.
    Conversion rule for InfoObject ZEBAY01
    Data type = CHAR
    ABAP type = C
    ABAP length = 000015
    FORM CONVERT_ZEBAY01
    USING RECORD_NO LIKE SY-TABIX
    SOURCE_SYSTEM TYPE RSA_LOGSYS
    IOBJ_NAME TYPE RSIOBJNM
    CHANGING RESULT TYPE DE_ZEBAY01 " InfoObject value
    RETURNCODE LIKE SY-SUBRC.
    $$ begin of routine - insert your code only below this line

    Hi Laxmi
    Use the below code.
    RESULT = RESULT+2(8).
      RESULT = RESULT(6).
      RETURNCODE = 0.
    First Result will take from 8 characters starting from first position. So you get rid of first two leading zeroes.
    Then take first 6 character from the result of above operation from the first character. You get rid off last 2 digits.
    Regards
    Anindya

  • Transfer Routine required

    Hi,
    I am getting the Alpha Numeric (for example:150DD say)data for the field 0SALESEMPLY into the infosource 2LIS_11_VAHDR, but the data type for 0salesemply is NUMC in the info source.
    Because of this data type(NUMC) the data for this filed is loading only the numeric value i.e.,150 only, but not as 150DD into the infocube.
    In order to load load as alpha numeric value, i think i need to write Transfer Routine for the 0SALESEMPLY info object in the Transfer rules (in 2LIS_11_VAHDR), there by it can load alpha numeric values for this info object.
    So please provide me the <b>Routine</b> which can transfer the alpha numeric data for the existing Data type(NUMC) for the info oblect in the infosource 2LIS_11_VAHDR.
    Thanks & Regards,
    Kishore

    Hi Anil,
    <b>I am loading the data from a Flat file where the data</b> , that contributes to the info object 0SALESEMPLY in the the info source 2lis_11_vahdr, <b>in the flat file for the respective field is Alpha Numeric values.</b>
    But we have the 0SALESEMPLY (BW) info object with data type Numc which accepts only numeric values.
    so it is loading only the numeric values(ex: 150 say) of that field but not the entire alpha numeric value(ex: 150AR, say).
    so in this situation how can i proceed.
    Please respond asap......
    Regards,
    Kishore

  • 0LOGSYS transfer routine error transporting DEV- QA

    Hello!
    I need to transport several business content infocubes and loading flow(migrated from 3x to in 7.0) from DEV to QA.
    In QA I've imported also infoobject 0LOGSYS and his transfer routine. But it appears iinactive. When I display the transfer routine from characteristic 0LOGSYS, is missing this part of code::
      IF RESULT IS INITIAL     and
         IOBJ_NAME = '0LOGSYS'.
    fill source system
        RESULT = SOURCE_SYSTEM.
    What can I do ?  In DEV, the code is ok. Can I modify it manually ? Other what must I do in DEV to repair it?
    Thanks a lot !

    I need to activate the object 0LOGSYS from Business Content again ? or manually with change and also change and save the routine?
    In STMS I have:
    Start of the after-import method RS_IOBJ AFTERIMPORT for object type IOBJ
    Syntax error Incorrect statement :Expression missing . in row 20 position 0
    Characteristic 0LOGSYS: Error when activating or checking the transfer routine
    This infoobject, 0LOGSYS is also attribute for others infoobjects and I have also errors like:
    Attribute 0LOGSYS from characteristic 0BUS_AREA is not actively available.
    I've imported also a data source 3x migrated to 7.0 with the transformation and an infocube, and I have error:
    Start of the after-import method RS_RSDS AFTERIIMPORT for object type RSDS
    Soource system DEV does not exist
    Start of the after-import method RS_TRFN_AFTER_IMPORT  fot object type TRFN
    No rule exists.
    Source RSDS mysource DEV does not exist
    AND SUMMARy:
    Object  IOBJ 0logsys imported with errors
    Thanks!

  • Error during creation of transfer orders for material

    Hi,
            We are doing a transfer of stock from one storage with WM to a storage without WM.
    But system does not finish the process automatically displaing the following error message:
    "Error during creation of transfer orders for material document 49000XXXX"
    System cannot find source storage bin
    Thanks in advance for the help
    Regard
    Enzo

    your picking strategy does not find the bin where the material is.
    So you need to check what value you have entered for picking in WM view of material master.
    then you have to check where your material is (storage type and bin)
    then you need to check customizing to where what storage types are included in the picking strategy that is tight to the material master entry.

  • Error during creation of transfer orders for mateRIA

    hi gurus,
    I am getting an error while moving material from sl0c2 to sloc1 which is connected to wh by mvmt 321. the document is getting posted and the stock is coming to sloc1,but the error is
    "Error during creation of transfer orders for mateRIAL.how to correct the error.
    regards
    murugan

    Hi,
    The material is maintained at the Warehouse level, hence warehouse transactions have to be completed, by creating a transfer order and the confirmation of the same will create a transfer posting from SL1 to SL2 in the system. This is trigerred automatically depending on the sytem configuration.
    Regards,
    raghu

  • Error while installing transfer rules for 0PM_C03 from Business content

    Hi All,
    When i try to install the transfer rules for the Infocube 0PM_C03 from the Business Content, i get the following error:
    "Mapping between 2LIS_17_I3HDR  2LIS_17_ORDER is inconsistent".
    Here 2LIS_17_ORDER is the Infosource, and 2LIS_17_I3HDR  is the datasource.
    Also, kindly let me know how can the Infosource and the datasource have different names, like in the case for this Cube.
    Kindly help...

    Hi,
    The datasource and infosource can have different names no issue with that.
    and while selecting transfer rule for installing find with '2LIS_17_I3HDR'.
    Regards,
    Rathy

Maybe you are looking for

  • What part do I need for my HP Pavillion e9150t

    I have a HP Pavillion e9150t. The USB port on the top left of the front broke. What part number do I need to get to replace it? It is circled in the attached photo. This question was solved. View Solution.

  • Adobe Reader Freeze Problem!!!

    Why does a pdf document freeze everytime I open a it with adobe reader?

  • Using int and SERIAL as datatypes in cmp Beans.

    Hi I�m using a postgresql database with my appserver 7. I have some trouble using some of the �normal� db functions. Ex SERIAL (or auto_number). Is it possible to create a create method in a cmp bean using SERIAL? I�m using SERIAL as the primary key.

  • ALE Configuration Needed

    Hi every one, I want steps involved in ale configuration. Lets take example two systems are Sysa and sysb Thank you

  • Is there any T-codes for all these............

    Hello all I came to know that there are T-codes for all these like Infoprovider,Infosource,PSA and etc......... pl let me know regards balaji