Ex_me_process_req_cust~process_header: How to Get Acct Assignment Data

I've created a custom class to use this BADI interface. Inside this process_header method I get the Purchase Requisition's item data, I now need to read the Purchase Requisition's account data, particularly the GL Account Number, and then change it. See below. Any feedback will help.
  Thank-You.
METHOD IF_EX_ME_PROCESS_REQ_CUST~PROCESS_HEADER.
  DATA: LT_ITEMS TYPE MMPUR_REQUISITION_ITEMS.
  DATA: LS_ITEM TYPE MEREQ_ITEM.
  FIELD-SYMBOLS: <FS_ITEM> TYPE LINE OF MMPUR_REQUISITION_ITEMS.
  CALL METHOD IM_HEADER->GET_ITEMS
    RECEIVING
      RE_ITEMS = LT_ITEMS.
  LOOP AT LT_ITEMS ASSIGNING <FS_ITEM>.
    LS_ITEM = <FS_ITEM>-ITEM->GET_DATA( ).
  ENDLOOP.
*Get/Read the Purchase Requisition Line Item Account Assignment Data Here
*Change the Purchase Requisition Line Item GL Account (SET?)
ENDMETHOD.

The line that is commented out gets a syntax error...expecting a field or function? Is it looking for an interface name to be called out subsequent to get_exkn? I guess I can then do set_exkn once this compiles  Thank-You.
METHOD IF_EX_ME_PROCESS_REQ_CUST~PROCESS_HEADER.
  DATA: LT_ITEMS TYPE MMPUR_REQUISITION_ITEMS.
  DATA: LS_ITEM TYPE MEREQ_ITEM.
  DATA: LT_ACCT TYPE MMPUR_ACCOUNTING_LIST.
  DATA: LS_ACCT TYPE MMPUR_ACCOUNTING_LIST.
  FIELD-SYMBOLS: <FS_ITEM> TYPE LINE OF MMPUR_REQUISITION_ITEMS.
  FIELD-SYMBOLS: <FS_ACCT> TYPE LINE OF MMPUR_ACCOUNTING_LIST.
  CALL METHOD IM_HEADER->GET_ITEMS
    RECEIVING
      RE_ITEMS = LT_ITEMS.
  LOOP AT LT_ITEMS ASSIGNING <FS_ITEM>.
    LS_ITEM = <FS_ITEM>-ITEM->GET_DATA( ).
    LT_ACCT = <FS_ITEM>-ITEM->IF_ACCT_CONTAINER_MM~GET_ITEMS( ).
    LOOP AT LT_ACCT  ASSIGNING <FS_ACCT>.
*      LS_ACT =  <FS_ACCT>->GET_exkn( ).
    ENDLOOP.
  ENDLOOP.
ENDMETHOD.
Edited by: Tom Matys on Dec 6, 2011 9:22 PM

Similar Messages

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

  • How to get last Build date of a dll in the real time target

    Info On My Project    
       I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...  
    I am facing some problems while checking Build date of my Application file( .dll)
    I have tried to use GetFileDate API. But it is not supporting for realtime Target..
    So i have tried __DATE__ macro.. That also having some problems..
    How to get last Build date of a dll from the real time target  ??
    Please Help to solve this....
    Thanks
    Vaishakh A  K

    Please reply if any one have suggestion...

  • I loos my APPLE ID, I have a new one, how can get access to data stored in the old one?

    I loos my APPLE ID, Now I have a new one, how can get access to data stored in the old one?

    Do you have the email & password of the old Apple ID?

  • How to get the "current date" in the BEx?

    Hi all,
    I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
    Thanks

    1. Create a  New Formula in Key Figures structure
    2. Give tech name and description and Select "New variable" option
    3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
    4. in next screene  select the date characteristic that represents the first date to use in the calculation (From Date)
    5. In the next  screen select Key in the Replace Variable with field. Leave all the other options as they are
    6. In the next Currencies and Units screen select Date as the Dimension ID.
    6. Save variable
    repeate the Above steps to create another variable (To Date)
    and now you can use these two new replacement path variables in your new formula.
    Dev

  • How to get the current date in a workflow

    Hey,
    Can anyone tell me how to get the current date while in a workflow?
    Thanks in advance.

    Here is how we did it, hope it helps
    <defvar name='locCalendar'>
    <new class='java.util.GregorianCalendar'/>
    </defvar>
    <defvar name='dateFormat'>
    <new class='java.text.SimpleDateFormat'>
              <s>MM/dd/yyyy</s>
         </new>
    </defvar>
    <defvar name='formatedDate'>
         <invoke name='getTime'>
    <ref>locCalendar</ref>
    </invoke>
    </defvar>
    <invoke name='format'>
    <ref>dateFormat</ref>
    <ref>formatedDate</ref>
    </invoke>

  • How to get the current date ? in the form of dd/mm/yyyy?

    Hi all,
    As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
    Regards
    Ashvini

    HI,
    Than u for the reply. But i am getting one error.
    as u said, I tried to do so.........
    but, i am getting one error.
    code
    Calendar cald=(Calendar.getInstance.getTime());
    out.println(cald);
    error message
    validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
    Calendar cald=(Calendar.getInstance.getTime());
    ^
    1 error
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    Pls help
    Regards,
    Ashvini

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to get the manufacturing date of iphone 5s?

    how to get the manufacturing date of iphone 5s?
    thanks

    Enter your serial number here:
    www.appleserialnumberinfo.com/Desktop/index.php
    To find your serial number:
    Settings > General > About > Serial Number

  • How to get backed up data in iphone3gs when the phone is disabled

    how to get backed up data in iphone3gs when the phone is disabled

    can someone help? this is shaking my trust in icloud backups.
    i am on iOS 6.1.

  • How to get the pixel data so as to work on it?

    Hi all,
    I am trying to write a plug-in that will crop and scale the image, edit the selection in the image document based on image data. For this purpose I need the pixel data of the image. How to get the image data as different pixels and what is the data structure used to store this data?
    Assumption: No layers i.e., only background
    Thanks in advance,
    Sailu

    Hi Ilya,
    Thank you for your post. In the plugin architecture you propose (automation + filter), do you have an idea about how to share the pixel data between the two plugins? I have found a post that gives details about how to get pixel data and show it using ADM components
    Matthew Hollingworth, "ADM Color Managed Preview?" #1, 22 Oct 2007 11:53 pm but it supposes that you have a filter plug-in.
    Again, does anyone knows how to preview the current image in a AUTOMATION plug in? This seems impossible.
    Thank you all for your help
    Cheers,
    Chaker

  • How to get current assigned participant id?

    Hi mates,
    This might be a basic questions, but useful for me :)
    How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity?
    Below is what I tried.
    Participant.id or Instance.participant.id - returns login user id
    Thanks

    Hi,
    Please correct me if I understood wrong.
    You want to know whether an instance is assigned or not and if assigned then you want to fetch the assigned participant id.
    If this is your requirement then please find the code below and make the necessary changes into it.
    Write the following code in screen flow automatic activity but before that you need to pass the instanceid as argument to the screen flow.
    In the process as well as screen flow layer make an instance variable instanceid as Int.
    Then make an argument variable instanceidArg as Int in both the screenflow and process layer and map accordingly so that it will take the instanceid from process layer to the screen flow layer.
    Assign instanceid = id.number; in process layer automatic activity but before the global interactive activity where you have maped the screen flow.
    Write the following code in screen flow automatic activity.
    logMessage("============= instanceid ==============" + instanceid); //instanceid is the id of the instance that you have passed from process layer.
    ProcessService ps;
    InstanceFilter instF = InstanceFilter();
    ps.connectTo(url : Fuego.Server.directoryURL, user : "<userid>", password : "<password>"); //In studio the userid and password will be same
    logMessage("Connected");
    instF.create(processService : ps);
    instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    //<ProessId Name> is the id of the process where you want to know the assighed participant id
    instF.addAttributeTo(variable : VarDefinition.processid, comparator : Comparison.CONTAINS, value : "/" + "<ProessId>");
    instF.addAttributeTo(variable : VarDefinition.INSTANCE_NUMBER, comparator : Comparison.IS, value : Int(instanceid));
    Fuego.Papi.Instance[] instances = getInstancesByFilter(ps, filter : instF);
    foreach (instance in instances) {
    logMessage("Assigned ?: " + instance.participantId.empty);
    logMessage("instance.participantId: " + instance.participantId);
    ps.disconnectFrom();
    Bibhu

  • How to get Default (System) Date Format Pattern?

    How to get system default date format which is defined in Regional Setting of Control Panel.
    We can get an instance of DateFromat using DateFormat.getDateInstance(DateFormat.SHORT) but problem is that there is no toPattern() exist in class DateFormat.
    However toPattern() exist in class SimpleDateFormat but there is no costructor like SimpleDateFormat(DateFormat)
    So please advise me, how can I get system short date format pattern?
    Thanks
    GAJESH TRIPATHI

    I reterieve the system date format but not which is currently defined in regional setting of control panel but it returns the format which is installed by default when windows(os) is installed.
    Edited by: gajesh on ? ????????, ???? ??:?? ?????????
    Thanks to provide me solution. My source code related problem is solved but still I am not getting format which is defined in control panel. but By Letting that it is not possible in Java,... I am doing my next work...so CLOSE THIS TOPIC Thanks'n Bye.

  • How to get both OTF data and spool at a time

    Hi Experts,
        My requirement is to get both OTF data and spool.
    In 'OPEN_FORM' i tried passing itcpo-TDGETOTF = 'X'. itcpo- TDNEWID = 'X'.
    I was able to get OTF data but spool is not getting generated.
    IF i pass only itcpo- TDNEWID = 'X'. the spool is getting generated but not OTF data.
    when both the fields are set i.e. itcpo-TDGETOTF = 'X'. itcpo- TDNEWID = 'X'.
    the spool is generation is getting supressed.
    Similarly when i tried to get OTF data by passing itcpo-TDGETOTF = 'X'. to 'OPEN_FORM' as i need to convert it to PDF and send it to vendors as email ,
    The print preview in TCODE ME23n was not getting generated for 'MESSAGE' option 'External send'.
    Please suggest me how to get both OTF data and spool at a time.

    Hi Kartik,
    This one is similar to my question to print and email invoice at same time.  I pass itcpo-tdgetotf = 'X' in order to get otfdata and send email with the attachment of otfdata.
    Now I have data in otfdata, but when I call print_otf function, I clear out itcpo-tdgetotf, and passed
    itcpo-tddest = device_type but I still get error message said 'Handler not valid for open spool request'.
    Can you give me a working example that you have otfdata table and print data from that table.  I also post my question on other thread
    submit report and export to memory
    thanks

Maybe you are looking for

  • How to create an inbox item with attached BOR object?

    Dear Colleagues, Does anyone of you know a simple way to create inbox items for a user? I would like to use the inbox for notifying users and attach a BOR object to the message as attachment. Is there a good and plain way to do that? It would also be

  • System Fan(90B) error...

    I bought an HP 630 Notebook PC one month ago. Now, when it's powerd on,  it's showing an error message like "System Fan is not working correctly System Fan(90B)". Though my laptop is currently working but I suspect, soon it will be in trouble due to

  • PL/SQL Colelction how to use in procedure

    i am converting SQL Server stored procedure in oracle in which i have made use of TABLE variable but TABLE variable is not there is oracle i searched on Google instead of TABLE variable we can use of COLLECTIONS in PL/SQL i could not find the syntax

  • Best practice in HCM

    Hi, 1) Can you please advise,what all processes comes under SAP Best Practices for HCM? 2) What all infotypes comes under Payroll implementations? Thanks! Manish

  • Error in DTP while loading data on 0PUR_O02 dso

    Hi Expert,                  While I am trying to load data on 0PUR_O02 ods through DTP  of 2lis_02_hdr data source is shows an error like "Runtime Errors         UC_OBJECTS_NOT_NUMLIKE" it is not able to execute the ABAP Progaram "GP3JRKF3SV9ZD4JVR3H