Use an infotype inside a BADI

Hi experts!!
I need to use the infotype 0021 like a parameter of my badi, but when I try to declare it I've got this error:
Infotypes is not supported in the OO context....
Can anybody help me?
Thanks a lot,
Regards,
Rebeca

ok I do it myself! thanks!

Similar Messages

  • Syntax error while using the parameter inside the badi method.

    Hello all ,
    I'm writing a code in the badi implementation . The badi is /SAPSLL/CTRL_MM0C_R3 . this badi contains a metthod API_CONTROL_MODIFY.This badi triggers while using MIGO transaction .
    It is having the following parameter .
    IT_MSEG     Importing     Type     SLLR3_MSEG_T .
    SLLR3_MSEG_T is declared as follows.
    TYPES: sllr3_mkpf_t LIKE mkpf OCCURS 0,
                sllr3_mseg_t LIKE mseg OCCURS 0.
    here i have to get the werks value that is populated into IT_MSEG whie doing MIGO .
    I have declared a local variable and assigned werks value from the IT_MSEG to the local variable as follows
    DATA:l_werks type werks.
    l_werks = IT_MSEG-WERKS.     
    But I'm getting the following error.
    "IT_MSEG" is a table without a header line and therefore has no
    component called "WERKS".
    How should i avoid this error. Please give me sample code on how to avoid this error.
    thanks in advance
    pavan

    Hi,
    Move the row from IT_MSEG into a work area and use it. Declare the workarea of required type.
    DATA:l_werks type werks.
    read table it_mseg into wa_mseg index 1.
    l_werks = wa_MSEG-WERKS.
    Regards
    Vinod

  • 2nd week running, I received an e-mail saying a new episode of Breaking Bad is available.  When I go to download its the "Inside Breaking Bad" short (which gives away spoilers - thanks Apple!) but not the episode itself.  What gives?

    2nd week running, I received an e-mail saying a new episode of Breaking Bad is available.  When I go to download its the "Inside Breaking Bad" short (which gives away spoilers - thanks Apple!) but not the episode itself.  What gives?
    I've tried this on multiple products so I believe its specific to iTunes not a particular device.

    Same thing here- Get the email but nothing but the Inside featurette. It's really annoying. In fact I can't even download it normally using the check for available downloads feature! Every time I do that iTunes tries to download doubles of three Walking Dead episodes I've already downloaded. I don't want what I already have, I just want the new episode.

  • FM to fill activity partner and Contact person inside a BADI

    Hi,
    When i create an activity i need to check for a condition and process the activity accordingly. The condition is that when an contact person is entered mistakenly on the activity partner field then i need to move to the contact person field and also find out the corresponding activity partner and fill it.
    For example, if i enter 123( assuming this to be a contact person) on the activity partner field, then i need to find what is the corresponding activity partner for this contact person(Assuming ABC to be the activity partner). I need to fill ABC on the acitivity partner field and 123 on the contact person field. I tried using ORDER_SAVE Badi for the same. The badi gets called and  i am able to read the curent value from ORDER_READ FM. I just don't get as to how to fill the activity partner and contact person inside this BADI. I am not able to find any FM for the same. Can i request some help pls?
    Thanks,
    Venkat

    Hi,
    maintain the partner change on document manually and debug this FM to see what should be the inputs.
    Maybe you are missing sth.
    Other way, better, would be using crmv_event tcode. there you can register your FM that will change partner on document.
    you can assign this FM for eg. to event AFTER_CHANGE and object PARTNER, and transaction category like Service Process.
    you can read /people/radoslaw.stefaniak/blog/2009/12/16/crmvevent--what-is-it for more information.
    Regards

  • Put a default value in an infotype with a BADI ?

    We want to put a default value in the administrators fields of the infotype 0001 (depending on the company code) when the user create/change it.
    A standard feature exist but onluy for the administrator group.
    Because we want to follow the technological evolution of SAP, we try to use a badi instead of a user-exit.
    So, we found this badi definition: HRPAD00INFTY (method BEFORE_OUTPUT).
    Problem: all the parameters (including the infotype value) are IMPORT parameters.
    So we can't modify the infotype content...
    Do anyone know how to modify the content of an infotype with a BADI ?
    Or do we must continue to use user-exit in such cases ?

    If one was just learning about userexits, BAdIs and the new Enhancement Framework as well as infotype PBO and PAI, this can be a bit of a mountain to climb, but these two documents might be useful.
    <a href="/people/sergey.korolev/blog/2005/03/14/the-time-for-me-to-have-a-badi-of-my-own time for me to have a BADi of my own</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/266">what the New Enhancement Framework Is For – Its Basic Structure and Elements For Beginners (Five Parts)</a>
    I "enhanced" the first article's solution with the second article's tutorial to cut my teeth on the new framework while providing myself with a means to use BAdIs for infotype PBOs/PAIs.  Thank you very much to the authors!

  • Best practice: Using break statement inside for loop

    Hi All,
    Using break statment inside FOR loop is a best practice or not?
    I have given some sample code:
    1. With break statement
    2. With some boolean variable that decide whether to come out of the loop or not.
    for(int i = 0; i < 10; i++){
    if(i == 5){
    break;
    boolean breakForLoop = false;
    for(int i = 0; i < 10 && !breakForLoop; i++){
    if(i == 5){
    breakForLoop = true;
    The example may be a stupid one. But i want to know which one is good?
    Thanks and Regards,
    Ashok kumar B.

    Actually, it's bad practice to use break anywhere other than in conjunction with a switch statement.Presumably, if you favour:
    boolean test = true;
    while (test)
      test = foo && bar;
      if (test)
    }overfor (;;)
      if (! ( foo && bar) ) break;
    }then you also favour
    boolean test = foo && bar;
    if (test)
    }overif (foo && bar)
    }Or can you justify your statement with any example which doesn't cause more complexity, more variables in scope, and multiple assignments and tests?

  • Using MovieClips, etc. inside of buttons?

    Hi.
    I created a movie clip (let's call it "mysymbol") that contains several buttons, as well as functions for MOUSE_OVER and MOUSE_OUT events ("mover" and "mout"). Everything works when the mouse enters "mysymbol" for the first time (mover is being called), but if I move the mouse inside mysymbol to another button, the MOUSE_OUT function (mout) is being called first and then immediately mover. Obviously, I don't want there to be any function calling at all!   I have found a way to circumvent this, but since I'm new at this I struggle to get it to work properly:
    If mysymbol is a button instead of a movie clip, then I can move my mouse freely within mysymbol without triggering any MOUSE_OVER or MOUSE_OUT events. However, there is another problem: I somehow can't get movie clips to work inside a button (I assume this is by design), so how do I get my animations etc. to work inside this button?
    Or is there an alternative to using a button as a container?
    Thank you in advance for your help!
    Edit: Hmm, using a buttons inside of buttons seems to be a bad idea either way - my "fix" only worked with ActionScript2, but since I'm using AS3 that is of no use to me. ... HELP!

    kglad wrote:
    don't trigger the parent's mouseout actions if the mouse is over a child.
    I'm sorry, I don't know what you mean by that or actually - how to do that.

  • Use of "infotypes" statement

    Hi,
    What is the use of infotypes statement.
    I saw a code block in sdn. here they have used a infotype statement as below.
    infotypes: 0041.
    tables: pernr.
    data: record type standard table of p0041,
    lfs_rec like line of record.
    parameters: p_pernr type persno.
    start-of-selection.
    call function 'HRAR_READ_INFOTYPE'
    exporting
    personnel_number = p_pernr
    infotype = '0041'
    IMPORTING
    RC = RC
    tables
    infotype_table = record
    exceptions
    exception_infotype = 1.
    loop at record into lfs_rec.
    write:/10 lfs_rec-pernr,
    30 lfs_rec-begda,
    42 lfs_rec-endda,
    54 lfs_rec-dar01,
    60 lfs_rec-dat01.
    endloop.
    In the above code they have used
    infotypes: 0041.
    But 0041 is not used anywhere in the program.
    I have read that infotypes statement is used to create a internal table. But here i have no clue they have craeted internal table separately.
    Please help
    Thanks in advance,
    Bala.

    hi Bala,
    You are right,  infotypes statement is used to create a internal table. Infotype can be used as reference to the standard table. eg if we consider the case of standard table PA0001, then is infotype is 0001.
    in case of this code:
    call function 'HRAR_READ_INFOTYPE'
    exporting
    personnel_number = p_pernr
    infotype = '0041'
    IMPORTING
    RC = RC
    tables
    infotype_table = record
    exceptions
    exception_infotype = 1.
    we are passing infotype as '0041', so it will read from standard table PA0041 and it will fetch data from that table according to p_pernr and the data will be fetched into the internal table 'record'. That is why infotypes are used.
    I hope this explaination is sufficient.
    regards
    arjun.

  • How do we use if statement in labview?moreover can i use if statement inside for loop?

    how do we use if statement in labview?moreover can i use if statement inside for loop?

    The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
    Attachments:
    For_Loop_with_Case.jpg ‏21 KB

  • Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?

    Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.

    Hi Jay,
    SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
    SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
    once on each server, and then the variable can be used by all the packages on this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • Function module (FM) to read budget  to be used in n-step approval badi

    We have SRM 5.0 with ECC 6.0 (extended classic). For capital expenses we are going to have budget check in SRM based of account assignment internal orders in R/3. In shopping cart line item approval workflow, it is required to read the budget available for that internal order and compare with shopping cart value...what is the function module to read budget assigned to that internal order, that will used in n-step approval badi at every step??
    Thanks,
    Kim r.

    Hi
    <b>Please try the related SRM function modules, which will definitely help -></b>
    B470_BUDGET_READ   
    BBP_PD_USER_BUDGET_AMOUNTSPENT  
    BBP_PD_USER_BUDGET_CHECK        
    BBP_PD_USER_BUDGET_DEFINED_GET  
    BBP_PD_USER_BUDGET_SAVE         
    BBP_PD_USER_BUDGET_SCVALUE_GET  
    BBP_REQREQ_CHECK_BUDGET 
    META_BUDGET_READ   
    META_BUDGET_READ Function module in turn calls RFC-enabled 'BBP_BUDGET_READ' Function module in the R/3 or the ECC System.
    Hope this will definitely help.
    Do let me know.
    Regards
    - Atul

  • Is using a 12 volt charger bad for my iPhone 5?

    Is using a 12 volt charger bad for my iPhone 5?  I just purchased the iPad Air and it came with the same lightning cable that was included with my iPhone 5.  The only difference is that the charger that came with my iPhone is a 10 volt and the one that came with my iPad Air is a 12 volt.  I find it would be easier if I could just use one cable instead of two, but I'm afraid that the12 volt charger would mess up my iPhone.  Can anyone help answer this question?

    There is no problem using the iPad charger with the iPhone. I've been doing it for years because it's just easier. The iPhone will stop charging when it reaches capacity. If you look at the Apple Online Store, you'll see that the 12-volt charger they sell is listed as working for both iPhones and iPads.
    Best of luck.

  • How to use analytical functions inside a mapping

    Hello everybody. Here Isend you a trick that we are using for two years.
    If you want to use a function (for instance :ROW_NUMBER() OVER (PARTITION BY ... ORDER BY ...)) inside a mapping you must create an expression with in the INGRP1 the fields you are going to use in the window function and in the OUTGRP1 the function you want. Create an Out -attribute with the expressión and link it to a distinct operator (using a "distinct" you encapsulte the sql and you will be able to use the function inside a filter - in the where clause.). The distinct can eliminate some register (depends on the function). If you validate the expression an error will appear (don't worry about that, the mapping will be ok).
    But there is a limitation, you will not be able tou sum over, min over, max over (it detect that they are aggregator functions). Other limitation: the debugger doesn't run with this kind of functions.
    Please publish this information on "The Warehouse Builder Utility Exchange". Mi email is [email protected] (if you need more information)

    It is possible to add SUM, MIN, MAX functions also to OWB releases prior to Paris - You have to put them in double quotes - write "MIN" "MAX" "SUM" etc. The rest of the rules (adding cut-off operator after the expression - as DISTINCT, or UNION ALL) is analogical to with ROW_NUMBER()
    That means You can create mapping with following functionality:
    SELECT
    sum (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    writing it this way in OWB:
    SELECT
    "SUM" (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    Regards,
    Martin

  • Is there a way to use EJBs directly inside WDJ without Model generation?

    Hello,
    Is there a way to use EJBs directly inside WDJ without Model generation, to avoid producing tonnes of code and reuse the JPA Entities?
    Thanks
    Sebastian
    Edited by: Sebastian Lenk on Nov 3, 2010 7:01 PM

    of course, you can.
    it's pure java programming.
    Context ctx = new InitialContext();
       Object o = ctx.lookup(
    "sap.com/HelloWorldEAR/REMOTE/HelloWorldBean/com.sap.sdn.ejb.HelloWorldRemote");
       HelloWorldRemote helloRef = (HelloWorldRemote) 
        PortableRemoteObject.narrow(o, HelloWorldRemote.class);

  • Problem in using aggregate functions inside case statement

    Hi All,
    I am facing problem while using aggregate functions inside case statement.
    CASE WHEN PSTYPE='S' THEN MAX(DECODE(POS.PBS,1,ABS(POS.PPRTQ),0)) ELSE SUM(DECODE(POS.PBS,1,ABS(POS.PPRTQ),0)) END,
    how can I achieve above requirement ? Con anyone help me.
    Thanks and Regards
    DG

    Hi All,
    Below is my query:
            SELECT
            CASE WHEN p_reportid IN ('POS_RV_SN','POS_PB') THEN POS.PACCT
            ELSE POS.PACCT || '-' || DECODE(POS.SYSTEMCODE,'GMI1','1', 'GMI2','2', 'GMI3','4', 'GMI4','3', '0') ||POS.PFIRM|| NVL(POS.POFFIC,'000') END,
            CASE WHEN p_reportid IN ('POS_RV_SN','POS_PB') THEN POS.PACCT||POS.PCUSIP||DECODE(POS.PBS,1,'+',2,'-')
            ELSE POS.PFIRM||POS.POFFIC||POS.PACCT||POS.PCUSIP||DECODE(POS.PBS,1,'+',2,'-') END,POS.SYSTEMCODE,CASE WHEN POS.PSTYPE='S' THEN POS.PSYMBL ELSE POS.PFC END,POS.PEXCH||DECODE(POS.PSUBEX,'<NULL>',''),
            POS.PCURSY,
            CASE WHEN POS.PSBCUS IS NULL THEN SUBSTR(POS.PCTYM,5,2) || SUBSTR(POS.PCTYM,1,4) ELSE POS.PSBCUS || SUBSTR(POS.PCTYM,5,2) || SUBSTR(POS.PCTYM,1,4) END ,
            NVL(POS.PSUBTY,'F') ,POS.PSTRIK,*SUM(DECODE(POS.PBS,1,ABS(POS.PPRTQ),0)) ,SUM(DECODE(POS.PBS,2,ABS(POS.PPRTQ),0))* ,
            POS.PCLOSE,SUM(POS.PMKVAL) ,
            TO_CHAR(CASE WHEN INSTR(POS.PUNDCP,'.') > 0 OR LENGTH(POS.PUNDCP) < 15 THEN POS.PUNDCP ELSE TO_CHAR(TO_NUMBER(POS.PUNDCP) / 100000000) END),
            POS.UBS_ID,POS.BBG_EXCHANGE_CODE,POS.BBG_TICKER ,POS.BBG_YELLOW_KEY,POS.PPCNTY,POS.PMULTF,TO_CHAR(POS.BUSINESS_DATE,'YYYYMMDD'),
            POS.SOURCE_GMI_LIB,
            --DECODE(POS.SYSTEMCODE,'GMI1','euro','GMI2','namr','GMI3','aust','GMI4','asia','POWERBASE','aust','SINACOR','namr',POS.SYSTEMCODE),
            DECODE(p_reportid,'RVPOS_SING','euro','RVPOS_AUSTDOM','aust','RVPOS_AUSTEOD','euro','RVPOS_GLBLAPAC','asia','POS_RV_SN','namr','POS_PB','aust',POS.SYSTEMCODE),
            POS.RIC,
            CASE WHEN PSUBTY = 'S' THEN POS.TYPE ELSE NULL END,
            DECODE(POS.UBS_ID,NULL,POS.PCUSP2,POS.ISIN),POS.UNDERLYING_BBG_TICKER,POS.UNDERLYING_BBG_EXCHANGE,POS.PRODUCT_CLASSIFICATION,
            CASE WHEN PSUBTY = 'S' THEN POS.PSDSC2 ELSE NULL END,
            CASE WHEN PSUBTY = 'S' THEN C.SSDSC3 ELSE NULL END,
            NVL(C.SSECID,POS.PCUSIP),
            NULL,
            POS.PYSTMV,
            POS.PMINIT,
            POS.PEXPDT,
            CASE WHEN POS.PSUBTY='S' THEN  SUBSTR(C.ZDATA2,77,1) ELSE NULL END,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL
            FROM POSITIONS_WRK POS LEFT OUTER JOIN
            (SELECT * FROM CDS_PRODUCTS CP INNER JOIN FUTURE_MASTER FM ON
            (CP.STRXCH=FM.ZEXCH AND CP.SFC=FM.ZFC AND CP.BUSINESS_DATE = FM.BUSINESS_DATE )) C ON POS.PCUSIP = C.SCUSIP
            AND NVL(POS.PCUSP2,'X') = NVL(C.SCUSP2,'X')
            WHERE
            POS.PEXCH NOT IN ('A1','A2','A3','B1','B3','C2','D1','H1','K1','L1','M1','M3','P1','S1')
            AND (POS.PSBCUS IS NOT NULL OR POS.PCTYM IS NOT NULL OR POS.PSTYPE ='S')
            AND POS.BUSINESS_DATE = run_date_char
            GROUP BY
            POS.UBS_ID,POS.SYSTEMCODE,POS.RECIPIENTCODE,POS.BUSINESS_DATE,POS.PACCT,POS.PFIRM,POS.POFFIC,POS.PCUSIP,POS.PBS,CASE WHEN POS.PSTYPE='S' THEN POS.PSYMBL ELSE POS.PFC END,
            POS.PEXCH,POS.PSUBEX,POS.PCURSY,
            CASE WHEN POS.PSBCUS IS NULL THEN SUBSTR(POS.PCTYM,5,2) || SUBSTR(POS.PCTYM,1,4) ELSE POS.PSBCUS || SUBSTR(POS.PCTYM,5,2)  || SUBSTR(POS.PCTYM,1,4) END,
            NVL(POS.PSUBTY,'F') ,POS.PSTRIK,POS.PCLOSE,TO_CHAR(CASE WHEN INSTR(POS.PUNDCP,'.') > 0 OR LENGTH(POS.PUNDCP) < 15 THEN POS.PUNDCP ELSE TO_CHAR(TO_NUMBER(POS.PUNDCP) / 100000000) END),
            POS.BBG_EXCHANGE_CODE,POS.BBG_TICKER,POS.BBG_YELLOW_KEY,POS.PPCNTY,POS.PMULTF,POS.PSUBTY,POS.SOURCE_GMI_LIB,RIC,
            CASE WHEN PSUBTY = 'S' THEN POS.TYPE ELSE NULL END,
            DECODE(POS.UBS_ID,NULL,POS.PCUSP2,POS.ISIN),POS.UNDERLYING_BBG_TICKER,POS.UNDERLYING_BBG_EXCHANGE,POS.PRODUCT_CLASSIFICATION,
            CASE WHEN PSUBTY = 'S' THEN POS.PSDSC2 ELSE NULL END,
            CASE WHEN PSUBTY = 'S' THEN C.SSDSC3 ELSE NULL END,
            NVL(C.SSECID,POS.PCUSIP),
            POS.PYSTMV,
            POS.PMINIT,
            POS.PEXPDT,
            CASE WHEN PSUBTY = 'S'  THEN  SUBSTR(C.ZDATA2,77,1) ELSE NULL END;Now, could you plz help me in replacing the bold text in the query with the requirement.
    Thanks and Rgds
    DG
    Edited by: BluShadow on 16-May-2011 09:39
    added {noformat}{noformat} tags.  Please read: {message:id=9360002} for details on how to post code/data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Event handler for disclosureopenicon in tree in flex 4

    hi all,           Is it possible to write event handler to disclosureopenicon for tree control in flex? if its possible means, h w can i write?

  • Exporting from FCP in QT Problem

    Hey, folks--would appreciate some help w/this. When I "export using quicktime" out of FCP-the newest version on my quad core--QT only exports about 15 seconds of whatever program it is. I've looked through the preferences in both QT Pro and FCP and f

  • Concatenate two columns in Obiee 11g

    Hi, I am trying to concatenate two columns from same table in OBIEE 11G , i tried all below syntax cast("Period"."Year" as Varchar)|| cast ("Period"." Month Name" as Varchar) cast("Period"."Year" as char)|| cast ("Period"." Month Name" as char) conta

  • Code Collapse/Folding in Flex Builder?

    Hi, I am using Flex Builder.  Is there a way to keep my code collapsed/folded?  If I open up a file with a ".as" extension I can collapse my functions but they don't stay collapsed when I re-open the file. 1. Is there a way to keep the code folded so

  • Turn off TV and SD box with one button?

    My TV's IR sensor is busted so I have no remote capabilities to control the TV.  I am looking for a way to turn off the TV along with my SD box at the same time.  Is this possible?   With my past service (cable) I was able to achieve this by plugging