How to call mmpv TCODE through BDC program.

Hi
In my  requriment i have to create custom program through which i have to call mmpv TCODE, because mmpv closes period for indivisual company code and for large number of company code it is time cunsuming exercise. for that i that i have to creat custom program. it is having selection screen like below.
company code                                   (marv-bukrs)
fiscal year of current period                 (marv-lfgja)
current posting period                         (marv-lfmon)
fiscal year of previous period                (marv-vmgja)   
month of previous period                      (marv-vmmon)
fiscal year of last periodof previous year (marv-vjgja)
last month of previoud year                  (marv-vjmon)
allow posting to previous year           (marv-xruem)
disallow dack posting after a change of period (marv-xruev)
and  output should show : company codes affected,the periods closed and the current period open for posting .and also show wheather back posting allowed / disallowed for the company code.

CALL FUNCTION 'BDC_INSERT'  "BDC_OBJECT_UPDATE
         EXPORTING
              TCODE     = 'mmpv'
         TABLES
              DYNPROTAB = BDC_TAB.
hope this helps
Warren

Similar Messages

  • How To call a Tcode From a Program and returning back ?

    Dear All,
    I have a requirement, i have to show all the open orders as in the the tcode va05  and return back to the my program. so how to display the tcode and getting back to my program. please help?

    Hi,
    Basic syntax to call the transaction is:
    SET PARAMETER ID <id name> FIELD <filedname>.
    CALL TRANSACTION <TCOde> AND SKIP FIRST SCREEN.
    If your are using ALV then snippet is :
    FORM user_command  USING okcode    LIKE sy-ucomm
                           lselfield TYPE slis_selfield.
      CASE okcode.
        WHEN '&IC1'. " SAP standard code for double-clicking
          CASE lselfield-sel_tab_field."check if double click is only on
            WHEN 'ITAB-AUFNR'."aufnr not on any other field
              SET PARAMETER ID 'ANR' FIELD lselfield-value.
              CALL TRANSACTION 'IW32' AND SKIP FIRST SCREEN.
          ENDCASE.
      ENDCASE.
    Endform.
    Pooja

  • How to call LSMW from a Report program

    Hi,
    I have a requirment of extending vendor master data (Companycode data and Purchasing Organization data ) through Tcode XK02 using LSMW.Also I need to generate an error log file for validating the data from flat file and  must have an export option of the error log file.
    Can you help me how to proceed on this in steps.
    Also pls let me know how to call LSMW transaction through a Report.
    Based on the selection criteria I need to maintain two source structues,one for companycode data and the other for Purchasing Orgnization data for uploading  data thru LSMW.How to do this?
    pls respond ASAP,
    Thanks,
    Nagendra

    Hi,
    create 2 LSMW object (under same project and subproject)..
    one for extended vendor master data for company code data and other for  extended purchase organization data for company code data.
    Now check the radio buttons and based on that populate ur LSMW object.
    Store project
      project = < >.
    Store subproject
      subproj = < >.
    Store object
      object  = '6GSC022_TS3'.
    if r_ccode = 'X'.
    Store object
      object  = < >.
    else.
    Store object
      object  = < >.
    endif.
    Call the function module to display object (LSMW) maintenance screen
      CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER'
        EXPORTING
          project        = project
          subproj        = subproj
          object         = object
        EXCEPTIONS
          no_such_object = 1
          OTHERS         = 2.
    Generating error log:
    After the checking the field if u think for this u need to generate error message then In the Maintain Field Mapping and Conversion Rules option under the required field write the following code:
    data: v_msgtxt(100) type c.
    message  <msg ID>    <message type>   <message no>
                     with   <var1>  <var2>
                     into v_msgtxt.
    write v_msgtxt.
    Follow the next step in LSMW object till you reach the option  Convert Data.
    After you execute this option you will get the desired message here.
    Regards,
    Joy.

  • How to change system time through java program

    Hi
    I want to know, how to change system time through java program.
    give me a idia with example.
    Thanks

    There isn't any core Java API for this. Use JNI or call an external process with Runtime.exec().
    ~

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • Call a Tcode from different program

    Hi frieds,
    How to call a Tcode using a push button in another report.
    Eg:   Tcode =  Ztest.  (for invoice list report, using 
                            the program zinvlist).
          This Ztest should be called in another report
          Zrep1 (program name Zsale) using the push button.
    Regards,
    A S VINCENT

    Hai Vincent
    *&      Form  DISPLAY_SEC1
         TO CALL TRANSACTION ME23
    form DISPLAY_SEC1.
    <b> SET PARAMETER ID 'BES' FIELD IT_EKKO-EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.</b>endform.                    " DISPLAY_SEC1
    also I will send you Some Sample Code
    *& Report  ZSSSS1                                                      *
    REPORT  ZSSSS1  LINE-SIZE 120
                    LINE-COUNT 25(3)
                    MESSAGE-ID ZSAN.
    *Program Desc: INTERACTIVE REPORT FOR PURCHASE ORDER DETAILS
                   BASIC LIST CONTAINS HEADER DETAILS
                   SECONDARY LIST CONTAINS ITEM DETAILS
                      AND CONDETION RECORD DETAILS
       T A B L E S         U S E D                                   *
    TABLES: EKKO,EKPO,KONV,LFA1,T001.
       S E L E C T I O N     S C R E E N                             *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    SELECT-OPTIONS:
          S_LIFNR FOR EKKO-LIFNR,
          S_BUKRS FOR EKKO-BUKRS.
    SELECTION-SCREEN END OF BLOCK B1.
       D A T A   D E C L A R A T I O N S                             *
    DATA: BEGIN OF IT_EKKO OCCURS 0,
              BUKRS LIKE EKKO-BUKRS,
              LIFNR LIKE EKKO-LIFNR,
              EBELN LIKE EKKO-EBELN,
              KNUMV LIKE EKKO-KNUMV,
          END OF IT_EKKO.
    DATA: BEGIN OF IT_EKPO OCCURS 0,
              EBELN LIKE EKPO-EBELN,
              EBELP LIKE EKPO-EBELP,
              MATNR LIKE EKPO-MATNR,
              INFNR LIKE EKPO-INFNR,
              MENGE LIKE EKPO-MENGE,
              MEINS LIKE EKPO-MEINS,
              NETPR LIKE EKPO-NETPR,
          END OF IT_EKPO.
    DATA: BEGIN OF IT_KONV OCCURS 0,
              KNUMV LIKE KONV-KNUMV,
              KSCHL LIKE KONV-KSCHL,
              KAWRT LIKE KONV-KAWRT,
              KBETR LIKE KONV-KBETR,
              KPOSN LIKE KONV-KPOSN,
          END OF IT_KONV.
    DATA: BEGIN OF IT_LFA1 OCCURS 0,
              LIFNR LIKE LFA1-LIFNR,
              NAME1 LIKE LFA1-NAME1,
              STRAS LIKE LFA1-STRAS,
              ORT01 LIKE LFA1-ORT01,
              PSTLZ LIKE LFA1-PSTLZ,
              LAND1 LIKE LFA1-LAND1,
          END OF IT_LFA1.
    DATA: V_BUTXT LIKE T001-BUTXT,
          FNAM(20) TYPE C,
          FVAL(20) TYPE C.
      A T    S E L E C T I O N - S C R E E N    O N    <FIELD>       *
    AT SELECTION-SCREEN ON S_BUKRS.
      PERFORM VALIDATE.
      S T A R T - O F - S E L E C T I O N                            *
    START-OF-SELECTION.
      PERFORM SELECT_DATA.   " SELECTION OF ALL DATA
      PERFORM DISPLAY_DATA.  " DISPLAY OF BASIC LIST
      A T   L I N E   S E L E C T I O N                              *
    AT LINE-SELECTION.
      GET CURSOR FIELD FNAM VALUE FVAL.
      CASE FNAM.
      WHEN 'IT_EKKO-EBELN'.
            PERFORM DISPLAY_SEC1.
      WHEN 'IT_EKKO-LIFNR'.
            PERFORM DISPLAY_SEC2.
      WHEN OTHERS.
            PERFORM DISPLAY_SEC3.
      ENDCASE.
      T O P - O F - P A G E                                          *
    TOP-OF-PAGE.
      PERFORM WRITE_HEADER.
      T O P - O F - P A G E   D U R I N G   L I N E  S E L           *
    TOP-OF-PAGE DURING LINE-SELECTION.
      PERFORM WRITE_HEADER2.
      E N D - O F - P A G E                                          *
    END-OF-PAGE.
      PERFORM WRITE_FOOTER.
    *&      Form  SELECT_DATA
          THIS FORM CONTAINS ALL SELECTION OF DATA STATEMENTS
    form SELECT_DATA.
    SELECT  BUKRS LIFNR EBELN KNUMV
            FROM EKKO
            INTO TABLE IT_EKKO
            WHERE LIFNR IN S_LIFNR
            AND BUKRS IN S_BUKRS.
    IF NOT IT_EKKO[] IS INITIAL.
    SELECT   EBELN EBELP MATNR INFNR MENGE MEINS NETPR
          FROM EKPO
          INTO TABLE IT_EKPO
          FOR ALL ENTRIES IN IT_EKKO
          WHERE EBELN = IT_EKKO-EBELN.
    IF SY-SUBRC = 0.
      LOOP AT IT_EKKO.
       LOOP AT IT_EKPO.
        SELECT  KNUMV KSCHL KAWRT KBETR KPOSN
                FROM KONV
                INTO IT_KONV
                WHERE KNUMV = IT_EKKO-KNUMV
                AND KPOSN = IT_EKPO-EBELP.
          APPEND IT_KONV.
        ENDSELECT.
      ENDLOOP.
    ENDLOOP.
    ENDIF." END OF IF FOR CHECK OF SY-SUBRC
       SELECT  LIFNR NAME1 STRAS ORT01 PSTLZ LAND1
               INTO TABLE IT_LFA1
               FROM LFA1
               FOR ALL ENTRIES IN IT_EKKO
               WHERE LIFNR = IT_EKKO-LIFNR.
    ENDIF." END OF IF FOR IT_EKKO IS NOT INITIAL
    endform.                    " SELECT_DATA
    *&      Form  DISPLAY_DATA
          DISPLAY THE BASIC DATA
    form DISPLAY_DATA.
      DATA: LINNO TYPE I.
      SORT IT_EKKO BY BUKRS LIFNR EBELN.
      LOOP AT IT_EKKO.
        READ TABLE IT_LFA1 WITH KEY LIFNR = IT_EKKO-LIFNR.
        SELECT SINGLE BUTXT
                      FROM T001
                      INTO (V_BUTXT)
                      WHERE BUKRS = IT_EKKO-BUKRS.
        WRITE:/1 SY-VLINE,
                (10) IT_EKKO-EBELN HOTSPOT ON,
                  SY-VLINE,
                (10) IT_EKKO-LIFNR HOTSPOT ON,
                  SY-VLINE,
                (15) IT_LFA1-NAME1 HOTSPOT ON,
                   SY-VLINE,
                (10) IT_EKKO-BUKRS HOTSPOT ON,
                  SY-VLINE,
                (15) V_BUTXT,
                 75 SY-VLINE.
                 HIDE: IT_EKKO-EBELN,
                       IT_EKKO-LIFNR.
         WRITE:/1(75) SY-ULINE.
        AT END OF LIFNR.
          LINNO = SY-LINCT - SY-LINNO - 1.
          SKIP LINNO.
        ENDAT.
      ENDLOOP.
    endform.                    " DISPLAY_DATA
    *&      Form  DISPLAY_SEC3
    form DISPLAY_SEC3.
      LOOP AT IT_EKPO.
         CLEAR: IT_EKPO, IT_KONV.
       READ TABLE IT_EKPO WITH KEY EBELN = IT_EKKO-EBELN.
        IF SY-SUBRC = 0.
              FORMAT COLOR 3.
              WRITE:/1 SY-VLINE,
                    (10) IT_EKPO-EBELN,
                    SY-VLINE,
                    (10) IT_EKPO-EBELP,
                    SY-VLINE,
                    (18) IT_EKPO-MATNR,
                    SY-VLINE,
                    (10) IT_EKPO-INFNR,
                    SY-VLINE,
                    (15) IT_EKPO-MENGE,
                    SY-VLINE,
                    (10) IT_EKPO-MEINS,
                     SY-VLINE,
                    (12) IT_EKPO-NETPR,
                      105  SY-VLINE.
               FORMAT COLOR OFF.
              WRITE:/1(105) SY-ULINE.
              FORMAT COLOR 4.
        READ TABLE IT_KONV WITH KEY KPOSN = IT_EKPO-EBELP.
         IF SY-SUBRC = 0.
          WRITE:/1 SY-VLINE,
               (10) IT_KONV-KNUMV,
               SY-VLINE,
               (10) IT_KONV-KSCHL,
               SY-VLINE,
               (15) IT_KONV-KAWRT,
               SY-VLINE,
               (12) IT_KONV-KBETR,
               SY-VLINE.
          WRITE:/1(95) SY-ULINE.
         FORMAT COLOR OFF.
       ENDIF.
    ENDIF.
    ENDLOOP.
    endform.                    " DISPLAY_SEC3
    *&      Form  DISPLAY_SEC1
         TO CALL TRANSACTION ME23
    form DISPLAY_SEC1.
    SET PARAMETER ID 'BES' FIELD IT_EKKO-EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    endform.                    " DISPLAY_SEC1
    *&      Form  WRITE_HEADER
            HEADER DISPLAY
    form WRITE_HEADER.
    FORMAT COLOR 3.
    WRITE:/1 SY-VLINE,
                (10) 'PUR.ORDER',
                  SY-VLINE,
                (10) 'VENDOR',
                  SY-VLINE,
                (15) 'NAME',
                   SY-VLINE,
                (10) 'COMP.CODE',
                  SY-VLINE,
                (15) 'COMP.DESC',
                 75 SY-VLINE.
    WRITE:/1(75) SY-ULINE.
    FORMAT COLOR OFF.
    endform.                    " WRITE_HEADER
    *&      Form  WRITE_FOOTER
    FOOTER OF LIST
    form WRITE_FOOTER.
    FORMAT COLOR 4.
    WRITE: /1 'USER:',SY-UNAME,
            45 'DATE:', SY-DATUM.
    FORMAT COLOR OFF.
    endform.                    " WRITE_FOOTER
    *&      Form  WRITE_HEADER2
             HEADER FOR SECONDARY LIST
    form WRITE_HEADER2.
          FORMAT COLOR 4.
          WRITE: /30 'INTELLIGROUP ASIA PVT LTD' CENTERED.
          WRITE:/50  'HYDERABAD' CENTERED.
              FORMAT COLOR 5.
               WRITE:/1 SY-VLINE,
                    (10) 'PUR.ORDR',
                    SY-VLINE,
                    (10) 'ITEM',
                    SY-VLINE,
                    (18) 'MATERIAL NUMBER',
                    SY-VLINE,
                    (10) 'INFO.RECD',
                    SY-VLINE,
                    (15) 'QUANTITY',
                    SY-VLINE,
                    (10) 'UNITS',
                     SY-VLINE,
                    (12) 'NETPRICE',
                      105  SY-VLINE.
               FORMAT COLOR OFF.
              WRITE:/1(105) SY-ULINE.
               FORMAT COLOR 6.
               WRITE:/1 SY-VLINE,
               (10) 'COND.RECD',
               SY-VLINE,
               (10) 'TYPE',
               SY-VLINE,
               (15) 'BASE VALUE',
               SY-VLINE,
               (12) 'AMOUNT',
               SY-VLINE.
               FORMAT COLOR OFF.
          WRITE:/1(95) SY-ULINE.
    endform.                    " WRITE_HEADER2
    *&      Form  DISPLAY_SEC2
       TO DISPLAY VENDOR DETAILS IN POP UP WINDOW
    form DISPLAY_SEC2.
    READ TABLE IT_LFA1 WITH KEY LIFNR = IT_EKKO-LIFNR.
    IF SY-SUBRC = 0.
      WRITE:/   'NAME IS:' ,   IT_LFA1-NAME1,
            /   'STREET IS:',  IT_LFA1-STRAS,
            /   'CITY  IS:',   IT_LFA1-ORT01,
            /   'POSTEL CODE IS:',IT_LFA1-PSTLZ,
            /   'COUNTRY IS: ', IT_LFA1-LAND1.
      WINDOW STARTING AT 1  15
             ENDING   AT 50 20.
    ENDIF.
    endform.                    " DISPLAY_SEC2
    *&      Form  VALIDATE
      VALIDATE BUKRS
    form VALIDATE.
    SELECT SINGLE *
                FROM T001
                WHERE BUKRS IN S_BUKRS.
    IF SY-SUBRC <> 0.
      MESSAGE E001.
    ENDIF.
    endform.                    " VALIDATE
    Thanks & regards
    Sreenivasulu P

  • How to call a Method in a Program?

    Hello,
    I am very new to the ABAP world.  I have been given a task to call a method if_hrbas_plain_infotype_access~read_single from the class CL_HRBAS_PLAIN_INFOTYPE_ACCESS in a program to see if we can use it to display some employee information.  I don't know how to call a method in a program.  Can somebody please provide me some pseudo code or instructions?
    Thanks.

    Hi Shan,
    here is the code to call a method. while calling the method Instance as 'r_info' which is the type reference to class as specified.
    pass the values to exporting parameters plvar,otype,objid...etc  according  to the requirement
    infotypes: 0002.   " creates an internal table p0002.
    data:
    r_info type ref to CL_HRBAS_PLAIN_INFOTYPE_ACCESS.
    TRY.
    CALL METHOD r_info->if_hrbas_plain_infotype_access~read
       EXPORTING
         plvar           = 
         otype           =
         objid           =
         istat           =
         infty           =
    *     SUBTY           =
         begda           =
         endda           =
         no_auth_check   =  'X'
         message_handler =
       IMPORTING
         PNNNN_TAB       = P0002
    *     HRTNNNN_TAB     =
    *     IS_OK           =
      CATCH CX_HRBAS_VIOLATED_ASSERTION .
    ENDTRY.
    LOOP AT P0002.
          WRITE:/
            P0002-VORNA,
            P0002-NCHMC,
            P0002-NACHN.
        ENDLOOP.
    Regards

  • How to call subroutines defined in ABAP program with type S

    how to call subroutines defined in ABAP program with type S? can you give an example?

    Normal executable program,
    REPORT  ZTEST_MAIN.
    perform sub1 in program ztest_sub.
    "you can call using in program addition
    Subroutine pool program
    PROGRAM  ZTEST_SUB.
    form sub1.
    endform.

  • How to call a idoc in abap program and updates catsdb table

    how to call a idoc in abap program and updates catsdb table
    thank you,
    Jagrut BharatKumar Shukla

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to call the Jsp through BPM Obejct

    Hi,
    I have gone through the some topic, how to call the Jsp through BPM Object.
    I have followed step below,
    1. I have create the sample jsp page
    2. Import into BPM studio under webroot\custom Jsp
    3. Created the screenflow and added the "Interactive Component call" object
    4. Right Click the Object and selected Maintask and Implementation type as "BPM Object Interactive Call"
    5. Selected the use JSP presentation object option and when i click ok its showing "BPM instance object must be selected"
    But when i select the Instance Variable tab, its not showing anything.
    Can any one help me how to call the Jsp in screenflow with step by step procedure, that would be very greate help for me.
    Regards,
    Anandh P

    Hi,
    You are running a jsp report through rwservlet. In this case paper layout will be displayed. You have to deploy your jsp as web report to get the web layout. Please refer to the doc below, which describes how to deploy the web report.
    http://download-uk.oracle.com/docs/html/B10314_01/pbr_run.htm#1011901
    To run the jsp report, URL may look like
    http://www.wwt.com/reports/<jsp name>?<parameter list>
    Hope this helps
    Vinayak

  • How to call session directly in bdc without using SM35

    how to call session directly in bdc without using SM35

    HI
    good
    you r using the sm35 to see the session for calling teh session in your report
    ATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE ,
    c_session  LIKE   apqi-groupid VALUE 'Z3PL_CUST' ,
    c_job      LIKE   tbtcjob-jobname VALUE 'Z3PL_JOB_CUST' ,
    c_flag     TYPE    c VALUE 'X'  ,
    g_qid      TYPE apqi-qid      .
    thanks
    mrutyun

  • How To Call HTML Page Through Java Swing Page  ???....

    Hi All ;
    Please Can You Tell Me How To Call HTML Page Through Java Swing Page ....
    Regards ;

    Hi,
    you can use HTML fragments on a panel.
    http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
    However, to integrate a browser you need 3rd party software like IceBrowser
    If you Google for: HTML Swing
    then you find many more hints
    Frank

  • How to call an API through Forms

    Hi,
    I want to call 'inv_quantity_tree_pub.query_quantities' from a custom form developed using Template.fmb.
    It is displaying error that 'remote package can not be called '.
    can any one help me on this issue.

    Hi;
    What is your OS?
    Please check below which could be helpful for your issue
    Oracle E-Business Suite Java APIs for Forms Troubleshooting Guide, Release 12 [ID 966982.1]
    http://drupal.org/node/751826
    http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/how-to-call-windows-apis-through-oracle-forms-developer-6i-1082381
    Regard
    Helios

  • How to find out tcode from a program that can run the same report?

    Hello all,
    I have a program name and I can see it is successfully proccessed. Now if I want to get the report via a tcode, how can I get it?
    How can I find the tcode from the program itself?
    Regards,

    Hi,
    1) Go into SE80, > Enter the name of the program, and press 'Enter'.
    2) You will see a folder called 'Transactions' appearing in the object list on the bottom left.
    3) Open the folder, and you'll find T.code of that program.
    Thanks,
    Nirav

  • Call transaction in a BDC program...

    Hi,
    I can see in one of the BDC program, the call transaction command is used. This BDC program updates the Vendor master table.
    CALL TRANSACTION BLF00-TCODE USING  FT
                                     MODE   ANZ_MODE
                                     UPDATE UPDATE.
    Now, I am trying to know what transaction code it is using in above call transaction to update vendor master.
    Regards,
    Rajesh.

    Put a break point on that statement in that program and run your program using MODE 'A', step thru the screens, when you get to that statement in debug mode, simply click on the BLF00-TCODE and see the value. 
    Regards,
    Rich Heilman

Maybe you are looking for