Routine at character level at transformations

ple correct
If  source_fields-vbeln ne 1000.
Result = ‘success’.
Elseif source_fields-vbeln eq 1000.
Result = ‘failure’.
Else.
i am getting this error
E:Field "‘SUCCESS’" is unknown. It is neither in one of the specified
tables nor defined by a "DATA" statement. "DATA" statement. "DATA"
statement.
i want sceneri like wher sales doc num is not eq 1000
its success
eq 0
its failure
why i am getting error.
regards
ss

If you write in start routine, the code will be applied on the source package as a whole and will be faster. But if you write as a rule, then it will be applied for each and every record in the package and will be slower.
Ravi Thothadri

Similar Messages

  • Why do u need conversion routine at object level?

    hi friends,
    what scenerio we use conversion routine at object level, while creating my character , there is option conversion routine, when we use, please give me 1 scenerio with sample code?
    regards
    ss

    Suneel,
    You can make transformation to the data for specific InfoObjects in the Transfer Rules and / or Update Rules.
    Now, when you do that, it will only affect that InfoObject in that particular set of rules.
    If you want to process o transform the data for this InfoObject ANYWHERE it is used, without the need of repeating it over and over in the Transfer or Update Rules where it is present, you just do it once, at the Object level.
    That's the main purpose.
    Sorry, I don't have a sample code.
    Regards,
    Luis

  • Copry control routine at header level

    Hi
    How to maintain a copy control routine at header level ie. transaction to transaction.
    This is required to copy field values from parent opportunity to the follow up transaction.
    Thanks
    Vidushi

    hi
    you can implement crm_copy_badi in se19.
    for filter you will point copying routine that you created in spro in "badi: enhancements for copying control". this routine should also be pointed in spro in "Define copying control for transaction types" in Copying routine column.
    in this badi you will have to find apropriate method that is being used by the system while making follow-up between your transactions.
    regards
    Radek

  • Regarding  Transfer Routine at InfoObject Level(in Maiantance Screen Of In

    hai
    i have some bad characters from the oracle source system .
    So im writing the following Transfer Routine in the transfer rule for all infoobjects .
    RESULT = TRAN_STRUCTURE-PRENBT.
    call function 'ZTHW_REMOVE_BAD_CHARACTERS'
    changing
    string = RESULT.
    translate RESULT to upper case.
    But i want to write this code at InfoObject Level in the Maintanence Screen (Create Transfer Routine)
    So how can i write this code in Maintanence Screen of each InfoObject instead of writitng in the transfer rules.
    Pls give the ABAP CODE at InfoObject Levele
    pls tell me
    i ll assing the points
    rizwan

    hi rizwan
    there is a result value for the conversion routine at iobj level also .Please see below :
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RSD, RSARC, RSARR.
    TYPES: DE_YA_M_IND(000006) TYPE C.
    Conversion rule for InfoObject YA_M_IND
        Data type       = CHAR
        ABAP type       = C
        ABAP length     = 000006
    FORM CONVERT_YA_M_IND
      USING    RECORD_NO LIKE SY-TABIX
               SOURCE_SYSTEM TYPE RSA_LOGSYS
               IOBJ_NAME TYPE RSIOBJNM
      CHANGING RESULT TYPE DE_YA_M_IND " InfoObject value
               RETURNCODE LIKE SY-SUBRC.
    $$ begin of routine - insert your code only below this line        -
      <b>RESULT = .
      RETURNCODE = 0.</b>$$ end of routine - insert your code only before this line         -
    ENDFORM.

  • Styling of text on character level

    Hi,
    I am looking for a control to edit text. The text should be styled on character level. E. g. only character on index 2 has a red background but the whole text field has a blue background.
    Is there a control existing in javafx 2 to achieve this?
    Regards
    Oliver

    Is it possible to switch off the controls and use the edit area only?Yes, there are ways to customize it:
    https://gist.github.com/2514709 code sample
    Re: Customizing  HTMLEditor element "Thread: Customizing HTMLEditor element"
    http://stackoverflow.com/questions/10075841/how-to-hide-the-controls-of-htmleditor (last section has info on hiding the toolbar - is done by code, but you might be able to achieve the same by a css stylesheet - which would be a better implementation - dgrieve's comment was "You can extract html-editor.css from jfxrt.jar to see what styles it uses.").
    There is also a jira to provide an api to control HTMLEditor allow programmatic control of editing capability, but that hasn't been actioned yet.
    Additionally you can use a WebView with contenteditable="true" see:
    http://stackoverflow.com/questions/10685395/webview-with-contenteditable-cannot-be-focused-programmatically

  • How to use routine or formular in the transformation??

    I need to write a routine or use formular in the transformation. The requirement is to change the value from source field calendar day (char. 8) e.g. 05.08.2008 to 07.2009 in infoobject ZCALMONTH(char.6) after data uploaded into infoprovider, namely plus one year. Does anyone know how to write a routine or use formular in the transformation.

    Hi,
    Try this..
    > data: year type i.
    > data:month type i.
    > data:lv_calday(6) type c.
    > year = source_fields-calday+0(4).
    > year = year + 1.
    > month = source_fields-calday+4(2).
    > if ( month <> 1 ).
    > month  = month - 1.
    > else.
    > month = 12.
    > year = year - 1.<here correct it as per your requirement - u want next year or previous year>
    > endif.
    > concatenate year month to lv_calday.
    > result = lv_calday.
    Hope it helps.Let me know any issues.
    Regards,
    Rathy
    Edited by: Rathy Moorthy on Jul 22, 2009 7:51 AM

  • Routine in infoobject level

    routine infoobject level  
    Posted: Aug 24, 2007 5:23 PM         Reply      E-mail this post 
    Hi all,
    In Transfer rule 0prodh2 is infoobject i can write routine
    prodh2 is heirarchy this filed come to data source level.
    in this 0prodh2 filed mappin to material value.
    i write routine in 0prodh2....
    TABLES: /BI0/PMATERIAL, /bic/azplan00.
    DATA: begin of itab2 occurs 0.
    include structure /bic/azplan00.
    DATA: end of itab2.
    DATA: begin of itab occurs 0.
    include structure /BI0/PMATERIAL.
    DATA: end of itab.
    $$ end of global - insert your declaration only before this line -
    FORM COMPUTE_PRODH2
    Compute value of InfoObject 0PRODH2
    in communication structure /BIC/CSZBWPLAN
    Technical properties:
    field name = PRODH2
    data element = /BI0/OIPRODH2
    data type = CHAR
    length = 000018
    decimals = 000000
    ABAP type = C
    ABAP length = 000036
    reference field =
    Parameters:
    --> RECORD_NO Record number
    --> TRAN_STRUCTURE Transfer structure
    <-- RESULT Return value of InfoObject
    <-> G_T_ERRORLOG Error log
    <-- RETURNCODE Return code (to skip one record)
    <-- ABORT Abort code (to skip whole data package)
    FORM COMPUTE_PRODH2
    USING RECORD_NO LIKE SY-TABIX
    TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
    G_S_MINFO TYPE RSSM_S_MINFO
    CHANGING RESULT TYPE /BI0/OIPRODH2
    G_T_ERRORLOG TYPE rssm_t_errorlog_int
    RETURNCODE LIKE SY-SUBRC
    ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line -
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
    select * from /BI0/PMATERIAL into itab
    where material = /BI0/PMATERIAL-prodh2
    and objvers = 'a'.
    endselect.
    RESULT = 0.
    returncode <> 0 means skip this record
    RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
    ABORT = 0.
    can any body give me solution.. or else give me sampl code..
    nag

    Hi Nag,
    you can change only RESULT
    Write code like this
    select * from /bi0/pmaterial into itab
    where objevers = 'a' and prodh2 = tran_strucutre-pordh2.
    result = itab-material
    hope thIs help

  • BI : Write BW 3.5 Transfer/Update routine to BI 7.0 Transformation routine

    Hi Gurus,
    I have 3.5 tranfer/ update routines. can anybody please tell me how to write the same routines in BI 7.0. I guess there are some syntax changes. For example below is the 3.5 update routine. Kindly advise me the steps or way of  how to write the same routine in BI 7.0.
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_ITM
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/APUR_O0100-NETPRICE
               RETURNCODE LIKE SY-SUBRC "Do not use!
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    Thanks & regards ,
    M.S
    Edited by: M.S on Oct 26, 2009 12:10 PM

    Hi ,
    solved on my own. Thankyou very much..
    thanks & regards,
    M.S
    Edited by: M.S on Oct 27, 2009 6:57 AM
    Edited by: M.S on Oct 27, 2009 6:59 AM

  • Character Level Authorization

    HI All,
    I am giving authorization to a user for a particularly country data which is for example India.Other countries are US,UK. I want to give authorization only India related data to the user.
    Maintained the authorization variable for my country Info object in the query. I made the country info object authorization relevant. I have created the authorization object Zcountry and assigned India to it. Created the User as well. Created the Role and maintained authorization data.
    1.  Do I need to give anything in the MENU tab when creating a role?
    2. When I click on change authorization data in the authorization tab, a choose template window appears. I selected S_RS_RREPU: BI Role: Reporting user. Is it the correct template for my requirement. When I select this template and go to the next
    screen, what all fields have to filled here...Please be very clear in answering this step. Please I want a detailed explanation.
    Could I get detail steps of creating Role in RSECADMIN. Particularly Menu, Authorization TABS.
    Regards,
    Sravan.

    Hi Kavitha,
    I have already gone through every document available, even the one you sent. My question was about the Menu and authorization tab, which is not explained at all in the document you sent. When we go to change authorization data, the document only mentioned about giving the authorization object name under the S_RS_AUTH. What about S_RS_COMP and S_RS_COMP1.
    I followed all the steps like giving Infoprovider name, cube name, report name under S_RS_COMP. At the end when I open the analyzer with the new user I can see  the authorized  Infoprovider name, cube name, Query name but when I execute my query I don't get any data. It say NO APPLICABLE DATA FOUND.
    In the document the MENU tab is in active version, normally if we don't fill anything in it, it will be in inactive version(RED), but it is in active version. So what did he do in the menu tab. It is not explained. I am getting very much confused as no document available gives a detailed view.
    It would be great if you could help regarding this. Thanks a lot. Kindly help.
    Edited by: Sravan Sabbineni on Jan 27, 2012 12:58 PM

  • Transformation routine for Infoobject lookup

    Hey guys,
    I am aware of Update rule routines but never done Transformation routine before. I didnt get any related post for my req.
    My requirement is on WBS element I have some attributes which is coming from std WBS Attr extractor but I have one custom attribute infooject which I want to populate through an Infoobject which is also a master data Infoprovider. For this I have to write a Tranfer rule routine.
    Please note these are transfer rules in BW 3.5 not BI 7. Please provide exact code. Appreciate your help.
    Thanks.
    BMW M///

    Declaration of Types table for your master data object in the declaration area....
    Replace your attributes in place of plant, GSRCSYS and CALMONTH
        TYPES: BEGIN OF TY_WBS,
                     /BIC/GPLANT TYPE /BIC/OIGPLANT,
                     /BIC/GSRCSYS TYPE /BIC/OIGSRCSYS,
                     CALMONTH TYPE /BI0/OICALMONTH,
               END OF TY_WBS.
        DATA: IT_WBS TYPE TABLE OF TY_WBS,
                    WA_WBS TYPE TY_WBS.
    /BIC/AWBS = your master data table name
    SELECT * FROM /BIC/AWBS INTO WA_WBS
        WHERE OBJVERS = 'A'.
    THen in the transformation Routine on field level use the below code to populate the value
    "  /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
       substitute your objects here to query the master data object to get values.
    READ TABLE IT_WBS INTO WA_WBS WITH KEY
          /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
    RESULT = WA_WBS-Your object name.
    Hope this will help you...

  • Primitive APAB editor in start/end routines in transformations

    When editing or viewing ABAP code in BI transformations, for example in a start routine, the editor that opens is very primitive compared to the normal SE38 editor. Some of the limitations include:
    The editor window doesn't cover the whole screen with seemingly no way to increase its size.
    The syntax check doesn't show on which line syntax errors are located.
    There is no option to perform a extended program check.
    There is no way to insert break-points (other than with the ABAP keyword of course)
    These limitations are present regardless of whether i choose the new front-end editor, the old front-end editor or the back-end editor. We're running SAP Netweaver 2004s.
    It is of course possible to create a program in SE38 and copy-paste your start routine code to see the code using the "real" editor, but this is very tiresome and time consuming. Is there a way to make this editor look and behave like the normal editor? I have looked through the setting options an searched SDN without finding a way.

    Hi,
    This is just the settings you need to change to open the start,end, and characteristics routine using the old editor you are comfortable with. No need to go to se38 and check copy the program.
    Go to se38->Utilities->settings->abap editor->editor tab->select the old abap editor.
    To specifically put break point in transformations (start routine..end routine..)..goto transformation (RSA1) and then display the transformation.
    Then goto extra (menu)->generated program. search for start_routine (method now) and put break point in the desired place.
    Then from the DTP enable all 4 break points..in tranformation (this will come when u cange it to debug mode simulation). And u can debug the transformation.
    The new editor is a good handy one. But take some time to get acquented to it. After you may start liking it :).
    Cheers,
    -J

  • Error while transporting Transformation: Syntax error in Start Routine

    Hi Everyone,
    I'm facing a strange problem during transporting one of the Business Content cubes from Dev. to Quality.
    I'd activated the DSO 'Purchase Order Items (0PUR_O01)' and its entire data flow from the 4 datasources 2LIS_02_CGR, 2LIS_02_SCN, 2LIS_02_SGR, and 2LIS_02_ITM from BC. Then I migrated the Transfer/Update rules to transformations and the DataSources to BI7 DataSource. So far so good. The migration was successful and all the objects were activated.
    Now when I transport the same to Quality, the import fails with return code 8 and the error message says:
    'Start of the after-import method RS_TRFN_AFTER_IMPORT for object type(s) TRFN (Activation Mode)'
    'Start Routine: Syntax error in routine'
    I verified that the transformation where the error orrured was the one from InfoSource Z2LIS_02_ITM to DSO 0PUR_O01. I went and checked the start routine and it did indeed have a syntax error:
    'In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter SOURCE_PACKAGE" is incompatible with the formal parameter DATA_PACKAGE". '
    But when I check in the Dev. system, there is no syntax error for the same routine. Later, I tried to transport only the said transformation by re-activating it in Dev, and again I got the same error.
    I have no idea why I'm getting a syntax error in the start routine when there are non in the Dev. system. Also none of the coding is customised, it was only the BC code, migrated to a transformation.
    Any suggestions on the steps I could take to transport the transformation to my quality system?
    Thanks,
    Ram

    Hi Ajay, Shanthi, svu and Ray
    I do indeed have a start routine in my transformation and it was migrated from a 3.x update rule to a BI 7 transformation routine.
    The migration was successful and the Start Routine has NO syntax errors in the start routine in the Dev. system. I only encounter the error while transporting it to the Quality system. I cannot modify the code in the Quality system because it is non-changelable and there is no point in trying to change the code in Dev. because there are no errors over there.
    I've also made sure that I've transported all the necessary objects required by the transformations to quality. The routine does not perform a lookup, it simply deletes some records from the data package based on the processkey value (which is itself present in the data package).

  • Syntax error in Start Routine routine 9998 in transformation

    Hi Guyz,
    I am getting the below error while doinf the syntax check in start routine in one of the transformation in BW production after the failed TR movement
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    "SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    but for the same transformation in quality its showing  no syntax errors found.
    its an odd behaviour.
    please guide with ur expertise.
    cheerz,
    raps.

    Hi,
    Check the note 1052648. it says that:
    Start routine:
               In the start routine, all the fields from the source are always available.
    During the migration, a type '_ty_t_SC_1_full' is generated in '2nd part global'. Since Note 1325124, this type has been adjusted when the field list is changed. In the past, a change to the field list caused syntax errors of the type:
    For update rules:
                        E: For PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is not compatible with the formal parameter "DATA_PACKAGE".
    For transfer rules:
                        E:For PERFORM or CALL FUNCTION "STARTROUTINE", the actual parameter "SOURCE_PACKAGE" is not compatible with the formal parameter "DATAPAK".
               If this error continues to occur, go to the solution section to correct it.
               Solution:
               This error should now be automatically corrected with Note 1325124. Access the incorrect start routine in change mode. The type '_ty_s_SC_1_full' is then automatically adjusted to the source structure. If this does not work, you should use the tool 'RSTRAN_MIGRATION_CHECK' (described in Note 1369395) to check and possibly repair the transformation in question.
               If this error still occurs, you can correct it manually as follows:
               Copy the field list of the type     '_ty_s_SC_1' from the 'private section' of the CLASS lcl_transform DEFINITION (you can find this when you scroll up in the routine editor of the start routine) to the type '_ty_s_SC_1_full' of '2nd part global'.
    Regards,
    Anil Kumar Sharma .P

  • Error in Open Hub Transformation Routine

    Hi,
    I created an Open Hub Destination which has 67 fields.
    In the transformation, i am using 'routine' for one of the transformation rule.
    In the routine, the target field type is not defined automatically and I am not able to change it. When i save the routine, it gives me error: E:The field string "_TY_S_TG_1" contains no fields.
    Please help.
    Thanks,
    CH
    CLASS routine DEFINITION.
      PUBLIC SECTION.
        TYPES:
          BEGIN OF tys_SC_1,
         InfoObject: 0MATERIAL Product.
            MATERIAL           TYPE /BI0/OIMATERIAL,
          END   OF tys_SC_1.
        TYPES:
          <b><i>BEGIN OF tys_TG_1,
         Field: TXTLG.
          END   OF tys_TG_1.</i></b> 
          PRIVATE SECTION.
        TYPE-POOLS: rsd, rstr.

    Hi,
    In the transformation, have you connected that rule to any target field of your destination? If not, then do that and then try to create the routine.
    Regards,
    Vaibhav

  • Infoobject routine problem in transformation using BI 7.0 datasource

    Hi expert,
    We have the business senario:need to look up data from Active data of DSO: /BIC/AZIN_O0100 into infoobject ZN1 in DSO:AAA through the link ZNR. We have the code, but after DTP, there are blank value in infoobject ZN1 in the content of DSO:AAA. Anyone can guide us why we get the blank in the value.
    DSO:AAA
    ZNR;ZN1
    Source field
    ZNR;
    Active data  /BIC/AZIN_O0100
    /BIC/ZNR;/BIC/ZN1
    Code in routine of infoobject ZN1 in transformation (BI 7.0 datasource)
        DATA: IT_ZN1 TYPE  /BIC/AZIN_O0100-/BIC/ZN1.
        SELECT /BIC/ZN1 INTO IT_ZN1 FROM  /BIC/AZIN_O0100
         WHERE /BIC/ZNR = SOURCE_FIELDS-ZNR.
        ENDSELECT.
        RESULT = IT_ZN1.

    Hi ,
    Please split this code in start routine and transformation routine.
    DSO:AAA
    ZNR;ZN1
    Source field
    ZNR;
    Start Routine
    Active data /BIC/AZIN_O0100
    /BIC/ZNR;/BIC/ZN1
    DATA: IT_ZN1 TYPE /BIC/AZIN_O0100-/BIC/ZN1.
    SELECT /BIC/ZN1 FROM /BIC/AZIN_O0100 INTO IT_ZN1
    FOR ALL ENTRIES IN SOURCE_PACKAGE
    WHERE /BIC/ZNR = <SOURCE_FIELDS>-ZNR.
    Transformation Routine
    READ TABLE IT_ZN1 with key
    /BIC/ZNR = <SOURCE_FIELDS>-ZNR BINARY SEARCH.
    IF sy-subrc = 0.
    RESULT = IT_ZN1 - FIELDNAME.
    Hope this answres you.
    -Vikram
    RESULT = IT_ZN1.

Maybe you are looking for

  • Moving multiple kids to different game center after the fact.

    I currently have multiple I pads in my house (kids) using the same game center account for last few years ipad 2 and ipad 3 .  So far no scores purchases etc have filtered into the wrong i pad but they both do make purchases in same games. Now they b

  • Web.show_document  spaces in the URL problem

    Hi, I am using Web.Show_document to call the report from the form. Here some of the parameters having a spaces. It is giving a problem and report is not running. Pl guide me in this issue. Thanks & Regards, Gangi Reddy

  • Stock details of a material with batch details

    Hi. I am developing a PP report for which i require the available material (un restricted stock) details and their batch details which are being displayed in MMBE (tcode). Is there any function module or BAPI or else what is the table name for findin

  • Nokia C3-01 won't start up after sw update

    Hi, I have just updated my firmwire for C3-01. After that the phone switched off automatically, but when I tried to restart my phone. The screen only displyaed whie background and turned off, and displayed white bacground again. Dose anyone know how

  • Is there a cable that works to hook up iPad  to an older Bose sound dock without audio jack?

    I want to be able to watch videos on my iPad while hooked up to my Bose sound dock, and from what I've read on various forums it seems that simply buying an extension cable is not the answer, unless the cable has all of the correct pins wired end-to-