How to execute the FM K_COSTS_PLAN_INTERFACE_TOTAL with ranges

Hi All,
can anybody suggest me, how to execute the Function module K_COSTS_PLAN_INTERFACE_TOTAL with  range of Cost element(KSTAR)
and what is the field for Cost Element TO
The fm is for tcode KP06
Edited by: Kachi Reddy on Feb 17, 2012 2:26 PM

Hi, Kachi.
Try this example:
REPORT rkkipl1t.
* The parameters are used to fill the internal table and describe the
* planning object.
PARAMETERS: p_kokrs LIKE tka01-kokrs  MEMORY ID cac  OBLIGATORY,
            p_perab LIKE cobk-perab   DEFAULT '001'  OBLIGATORY,
            p_perbi LIKE cobk-perbi   DEFAULT '012'  OBLIGATORY,
            p_gjahr LIKE cobk-gjahr   MEMORY ID gjr  OBLIGATORY,
            p_versn LIKE cobk-versn   MEMORY ID kvt  OBLIGATORY,
            p_kostl LIKE cssl-kostl                  OBLIGATORY,
            p_kstar LIKE cskb-kstar                  OBLIGATORY,
            p_vrgng LIKE cobk-vrgng   DEFAULT 'RKP1' OBLIGATORY,
            p_kwaer RADIOBUTTON GROUP ein DEFAULT 'X',
            p_owaer RADIOBUTTON GROUP ein,
            p_twaer RADIOBUTTON GROUP ein,
            p_waers LIKE coss-twaer.
DATA: i_rku01_cur LIKE rku01_cur.
* internal table for function
DATA: itrku01g TYPE TABLE OF rku01g WITH HEADER LINE.
REFRESH itrku01g.
PERFORM fill_itrku01g.
* Which currency is to be used?
IF p_twaer = 'X'.
*   planning in transaction currency
  i_rku01_cur-wtg_man = p_twaer.
  i_rku01_cur-wtf_man = p_twaer.
ELSEIF p_owaer = 'X'.
*   planning in object currency
  i_rku01_cur-wog_man = p_owaer.
  i_rku01_cur-wof_man = p_owaer.
ELSE.
*   planning in controlling area currency
  i_rku01_cur-wkg_man = 'X'.
  i_rku01_cur-wkf_man = 'X'.
ENDIF.
CALL FUNCTION 'K_COSTS_PLAN_INTERFACE_TOTAL'
  EXPORTING
*    BLTXT                  = ' '
*    COMMIT                 = 'X'
*    DELTA                  = ' '
    gjahr                  = p_gjahr
    kokrs                  = p_kokrs
    messages_show          = 'X'
    perab                  = p_perab
    perbi                  = p_perbi
    update_values          = 'X'
    versn                  = p_versn
    vrgng                  = p_vrgng
*    ONLINE_VB              = ' '
    irku01_cur             = i_rku01_cur
*    TESTMODE               = ' '
*    KEEP_TWAER             = ' '
  TABLES
    irku01g                = itrku01g
EXCEPTIONS
   messages_occured       = 1
   OTHERS                 = 2
IF sy-subrc = 0.
  MESSAGE s000(15).
*   Verbuchung wurde erfolgreich durchgeführt
ENDIF.
*  FORM FILL_ITRKU01G
FORM fill_itrku01g.
* fill internal table for function
  CLEAR itrku01g.
  itrku01g-kostl    = p_kostl.              "for CCA planning
  itrku01g-kstar    = p_kstar.              "must be filled
  itrku01g-wtgbtr   = 12000.                "value when planning
  itrku01g-wkgbtr   = 12000.                "value when planning
  itrku01g-wogbtr   = 12000.                "value when planning
  itrku01g-twaer    = p_waers.              "transaction currency
  itrku01g-fcwkg    = '1'.           "distribution key must be filled
  itrku01g-fcwkf    = '1'.                  "must be filled
  itrku01g-fcwkv    = '1'.                  "must be filled
  itrku01g-fcmeg    = '1'.                  "must be filled
  itrku01g-fcmef    = '1'.                  "must be filled
  itrku01g-fcmev    = '1'.                  "must be filled
  APPEND itrku01g.
ENDFORM. "FILL_ITRKU01G.
Best regards,
George Shlyahov.

Similar Messages

  • How to execute the transaction SCI

    Hi All,
    How to execute the transaction SCI
    Thank you,
    Sridhar.

    Hai ,
    there are two ways to use SCI , one is you open you code in se38 -->display mode --> Program >check>code inspector. here your program is executed with a dafault variant provided in SCI.
    Second method is go to SCI , create a inspection  an choose a variant , here system provide you with a wide range of program checks (security/syntax etc)
    For any further help.
    Do reply.
    Regards
    Jase

  • How to change the year in a range of column dates to the new year?

    How to change the year in a range of column dates to the new year?

    Depends on the pattern of the dates. The last procedure will work for any pattern, or no pattern at all.
    For examples.the dates are assumed to be in column A, starting at A2
    Sequential dates?
    Enter first updated date in the first cell.
    Enter =A2+1 in cell A3. Copy the cell.
    Select A3 to the end of the list. Paste.
    With the cells still selected, Copy, then go Edit > Paste Values.
    Evenly spaced dates?
    Same procedure as above, but replace +1 in the formula with + and the number of days between dates in the list.
    Randomly spaced dates?
    Select cell B2. Press option-left arrow to insert a (temporary) column to the left of column B.
    Click on the empty cell B2 in the new column. Enter the formula below:
    =DATE(YEAR(A)+1,MONTH(A),DAY(A))
    Copy the cell, then select B2 - Bn where n is the last ow containing a date to be converted. Paste,
    With the cells still selected, Copy.
    Click on A2, then go Edit > Paste values.
    Click on the column B reference tab to select all of column B.
    Hover the mouse over the right end of the reference tab, and click the black triangle when it appears.
    Choose Delete Column from the menu that appears.
    Regards,
    Barry

  • How to execute the data in the form when the data is already avaliable

    Hi,
    I am working with forms 6i. I have a problem while executing the data in the form
    Actually, the data is already present in the form. But when i run the form, the data is not displayed.
    can anyone please help me how to execute the data. below is the code
    Set_Alert_Property(alert_id,ALERT_MESSAGE_TEXT,'Do you want to refresh new Data for that Year and Field ? (it will take a time).') ;
                   SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON1, LABEL, 'Yes');
                   SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON2, LABEL, 'No');
                   SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON3, LABEL, 'Cancel');
                   button_number :=Show_Alert(alert_id) ;
                   synchronize;
                   if button_number != ALERT_BUTTON3 then
                        if button_number = ALERT_BUTTON1 then
                             :param.field := :control.f_cd;
                             :param.year := :control.year;
                             build_tables;
                             fields;
    -- areas(:param.field);
                             PUT_PARAM;
                             COMMIT_FORM;
                        go_block('wet_criterias');
                        end if;
                        if button_number = ALERT_BUTTON2 then
                             :exhibits.field_display := :control.f_name || ' - Exhibits';
                             go_block('RESERVOIR');
                             execute_query;
                        end if;
                   end if;
              end if;
    else
         message('Fields must be entered...');
    end if;
    else
    message('Fields must be entered...');
    end if;

    It's hard to know what logic you are trying to implement.
    However, by looking at your code, it seems that if the user select 'Yes' to the question "Do you want to refresh", nothing is done except the go_block('wet_criterias'). Should there be an 'Execute_Query' ?
    No idea...

  • How to read the 'Input help with fixed values' of domain .

    How to read the 'Input help with fixed values' of domain .
    The domain has a Value range i want to read those values .
    Are these values stored in any table ?
    Plz help me i need it ver badly...
    Thanks in Advance...

    Hi Chandra Shekhar,
    To read the 'Input help with fixed values' of domain , you can use the function module : HR_P_GET_FIXED_VALUE_TEXT.
    iIf you enter the domain name, you will find the fixed values entered in the domain.
    These values are stored in a table DD07L(DD zero 7 L). Here the values are stored based on domain name.
    See if it works for you.
    Award points if its helpful.
    Regards,
    Bhanu

  • How to execute the logical database.

    how to execute the logical database.

    There are two ways of using a logical database - either by linking it with the executable program(specify the LDB name in the program attributes) or by using the function module LDB_PROCESS.
    1.Data read by the logical database is passed back to the program using the interface work areas.Use GET statements in the report.
    GET events are implemented internally as FORM routines.
    2.If you call the logical database using the above function module, the selection screen of LDB is not displayed.It uses special subroutines called callback routines, which are called by the function module and filled with the required data.
    Please refer the following link for more details.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm

  • How to execute one .exe file with as3 in air ?

    Hi
    How to execute one .exe file with as3 in air?
    I want do this work without fscommand .
    plize help me .

    itsdhanasaraa wrote:
    But as this a web application ... By using Runtime i'm getting some probs ..
    Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
    Ain't gonna happen.
    its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
    1) it's not "taking more time to execute", whatever that's supposed to mean.
    2) there's no other way to execute something. Not that you should every use even that way anyway
    3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place.

  • How to execute a system command with call executable in teststand 4.2.1?

    Hi All,
          how to execute a system command with "call executable" step in teststand 4.2.1?
          example as i want to quit a application.using "taskkill /f /im xxx.exe".And execute other system command(DOS).
    BR
    Johnny

    Hi, 
    I want to run netstat -an | find "8080" command from command prompt using call executable in test stand. after that i would like take the std output to local variable. 
    Attachments:
    callsettings.jpg ‏404 KB

  • How to Execute the procedure?

    Hi,
    How to execute a below procedure with refcursor output parameter,
    in that procedure refcursor declare in package
    create or replace PROCEDURE prc_sam(
    P_LIST OUT pkg_sam.REF_CURSOR_TYPE) IS
    BEGIN
    OPEN P_LIST FOR
    SELECT 1+1 FROM dual;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20001,SQLERRM);
    END prc_sam;
    Regards,
    Fame

    SQL> create or replace PROCEDURE prc_sam(
    2 P_LIST OUT SYS_REFCURSOR) IS
    3 BEGIN
    4
    5 OPEN P_LIST FOR
    6 SELECT 1+1 FROM dual;
    7 EXCEPTION
    8 WHEN OTHERS THEN
    9 RAISE_APPLICATION_ERROR(-20001,SQLERRM);
    10 END prc_sam;
    11 /
    Procedure created.
    SQL> VARIABLE P_CURSOR REFCURSOR;
    SQL> EXEC prc_sam(:P_CURSOR);
    PL/SQL procedure successfully completed.
    SQL> PRINT P_CURSOR;
    1+1
    2
    Intead of SYS_REFCURSOR, you can use ur pkg_sam.REF_CURSOR_TYPE inside a package
    AND
    execute a procedure like EXEC pkg_sam.prc_sam(:P_CURSOR);
    like this, then you will get the result............................
    Thanks,
    Ann

  • How to execute the job from script ??

    How to execute the job from script ?? i have 2 jobs  A AND B . I want to execute job B  from job A'S Script ?? how can i ??

    Hi Kishore,
    Please refer the below link for BODS Job execution using Script
    Executing a job by another job in BODS 4.1 using simple script
    http://scn.sap.com/community/data-services/blog/2013/12/04/executing-a-job-by-another-job-in-bods-41-using-simple-script
    Steps for executing BODS job from Unix Script with user defined global parameters
    http://scn.sap.com/community/data-services/blog/2013/09/02/steps-for-executing-bods-job-from-unix-script-with-user-defined-global-parameters
    Executing a job using batch file
    http://scn.sap.com/thread/3503338
    How to add a schedule for job2 with a condition after job 1 is finished
    http://scn.sap.com/message/14523514#14523514
    Scheduling BODS Jobs Sequentially and Conditionally
    http://scn.sap.com/docs/DOC-34648
    Thanks,
    Daya

  • How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?

    How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?
    I basically managed to learn how to invert parameters which allows me to be as default in the clean guitar channel and if I switch the first button on the midi foot controller I switch to crunch, but at this point I tryied so hard to programm the second and third button to switch, only through a button in one step, to a third channel for distorsion or a 4th channel for solo guitar but I couldn't figured out how this work can be done!
    I would appreciate if anyone could help or share this experience with others who are experiencing the same problem.
    Cheers.
    F.

    I cannot seem to get mainstage to recognize my FCB either. I am using IFCB. Anyone figure this out?
    Thanks,
    Eric

  • How to fix the .pdf file with error "invalid annotation object"

    how to fix the .pdf file with error "invalid annotation object"

    As long as the PDF opens, then just try saving it to a new file name. There may be a preflight script that would help troubleshoot the issue.

  • How to set the screen size with nested Iview screen

    Can someone show me how to set the screen size with nested IView  screen.
    at the moment i only try it with trial and error untill it looks somewhat close. Is there a property in VC to set the size for Height and width.
    The same question is for the form. the form elements inside the form is easy but the actual form is still a challenge.

    Hi,
    Yes you are correct ,Still the Form and iview are not able to change thier Layout Structure using a Propery.
    it is available with VC7.1
    Govindu

  • Workflow Questions - How to execute the steps in a workflow automatically?

    I am using MDM 5.5 SP6.
    My Question is how to execute the steps in the workflow automatically. That means NO user interaction.
    I have a simple workflow, Start- Process -- Syndicate -  Stop.
    When a new record added /updated/inserted this workflow will start automatically.  The workflow inbox, the workflow status is u2018Receivedu2019 Step is u2018Processu2019.  Now I have to right click on the record then u2018Next Stepu2019 then click on u2018Syndicateu2019 then workflow completes automatically.
    How to execute the Syndication step automatically?.  I donu2019t want to have any user interaction to syndicate these records.
    Is this possible?
    The reason for this is I want to do some field validation and based on the field validation some assignments then then I want  to syndicate these records without user interaction..

    Hi,
    If you want to do some validations and then based on result assignments on some of the fields before syndicating, then you have to use workflow. Only syndication server will not fulfill this requirement.
    you may try by making validation's automatic property as "Error". This way it will not allow to add any record not fulfilling validation. You can also try using calculated fields instead of assignment.
    I am not sure if you can make your workflow fully automatic, because atleast one process step is must for any workflow, and process step means user action.
    Regards,
    Shiv

  • How to get the contents associated with a component.

    How to get the contents associated with a component.
    Like i have 2 buttons and i want to get the contents associated with these button without clicking them i.e without firing the event.
    By Contents i mean, whatever things we get after firing the event,we get some other window and some thing is added to the current page and so on.

    grab all the code inside the actionPerformed(ActionEvent e) method

Maybe you are looking for

  • How to change the default 'screenshot' save from 'png to jpg'

    Can someone tell me how you change the default on this so I don't have to 'change the file' every single time?

  • Add midnigh time to a date

    Hi, <cfset endDate = DateAdd("d", 1, endDate)> this will add one date into the endDate.  Instead of add one date, i want it to add the midnigh time to the endDate. such as: 2012/10/01 23:59:59 i had tried this <cfset endDate= DateAdd("ms",86399997,en

  • Create a glossary/element index in WebCenter Portal

    I need to create a glossary/element index like this in WebCenter Portal. Do you know if exists any ADF/Trinidad element to do this? Thank you

  • Help needed to figure out a strange thing

    I am running GJ and Java 1.4 on window 2k and I have been spending hours trying to figure out what's wrong with the following codes. Any help would be greatly appreciated. The code is simplified (doesn't use any util class at all), but it still throw

  • DEFAULT PO TYPE IN MD04

    Hi all, I am in ECC6 and I have the following problem: purchase requisition type NB is used for all the companies. This type links a lot of different Purchase order types. When I try to convert PR into PO from MD04, the system takes automatically PO