Calling two transaction in one Zprogram

How to call two transaction (MIGO and MIRO)with each transaction should display two different window simultaneously from one Zprogram..
Pls let me know ...

Hello Arun
If you like to use an ABAP-OO version here is my approach:
*& Report  ZUS_SDN_CALL_TRANSACTION
REPORT  zus_sdn_call_transaction.
TYPE-POOLS: abap.
PARAMETERS:
  p_tcode      TYPE tcode.
START-OF-SELECTION.
  CALL FUNCTION 'AUTH_CHECK_TCODE'
    EXPORTING
      tcode                          = p_tcode
    EXCEPTIONS
      parameter_error                = 1
      transaction_not_found          = 2
      transaction_locked             = 3
      transaction_is_menu            = 4
      menu_via_parameter_transaction = 5
      not_authorized                 = 6
      OTHERS                         = 7.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  CALL METHOD cl_reca_gui_services=>call_transaction
    EXPORTING
      id_tcode             = p_tcode
*      IF_LEAVE_CURRENT     = ABAP_FALSE
*      IF_SKIP_FIRST_SCREEN = ABAP_FALSE
       if_new_external_mode = abap_true  " new mode
    EXCEPTIONS
      error                = 1
      OTHERS               = 2.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
END-OF-SELECTION.
Regards
  Uwe

Similar Messages

  • Two transactions in one BDC

    Hi Experts......
          Could anyone help me how to call two transactions in one BDC Report.I know that it is possible through BDC Session Method. Could you please provide me the procedure...?
    Thanks & Regards,
    Sai..

    Hi,
    take all the fields to internal table and then use like this.
    Loop at it_table to wa_table.
    *************for first Transaction
    perform bdc_dynpro      using 'SAPMP50A' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=INS'.
    perform bdc_transaction using 'TCODE'." first t code
    *****************for second transactions
    perform bdc_dynpro      using 'SAPMP50A' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=INS'.
    perform bdc_transaction using 'TCODE'." this t code is second one
    endloop.
    try this, i hope you can succeed.
    Regards,
    Arjun.
    Edited by: mallikarjuna goud on Dec 17, 2008 10:35 AM

  • Call two programs from one program.

    HI all,
    I have two BDC interface in seperate programs.
    I want to call that two programs from one program based on a condition.
    Is there any way.
    I tried with call transaction 'SE38'.
    set parameter ID but it is taking buffered value.
    Thanks,
    sri

    use submit program to call other program.
    SUBMIT prog|(field) [AND RETURN] [options].
    also if you want BDC prog, then probably you can call the BDC recording using PERFORM bdc_prog (in program name).
    PERFORM (<fsubr>)[IN PROGRAM (<fprog>)][USING   ... <pi>... ]
                                           [CHANGING... <pi>... ]
                                           [IF FOUND].
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm

  • Calling two smartforms in one Abap program

    Hi ABAPers,
    Can anybody know how to call 2 smartforms in 1 abap program?actually i used the FM SSF_FUNCTION_MODULE_NAME...and two smart forms are called...but my main problem is...the first smartforms is called and the print dialog box appeared...once i click the button back ...the second smartforms is called and print dialog box appeared again..
    I want to correct this...i want this  to be happen once i click the print button...the two smart forms will be combined in a one printing...meaning the first page is the first smartforms and the next page will be the second smart forms...no matter how many pages will be the first smartforms...the second smartforms will concatenate or will append to the last page of the first smartforms..how can i do this?
    Please help...this is my sample code..kindly correct the error.
    Will reward points...
    suppressing the dialog box****************************
        outop-tddest = 'LP01'.
        cparam-no_dialog = 'X'.
        cparam-preview = space.
        cparam-getotf = 'X'.
    Call the First Smartforms *******************
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_CHEQUE'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Call the Second Smartforms *******************
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_TSHEET'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Thanks in advance
    aVaDuDz

    hi,
    i never used these function but i've found this link.
    [http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450]
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
    [SMartform printing;
    hope that is useful.
    bye
    Marco
    Edited by: nicolai marco on Jan 14, 2008 12:36 AM

  • Calling two servlets frm one browser window

    My html page ahve 3 frames
    and for 2 frames src are two difft. servlets and for one frame its static html file
    <html>
    <frameset rows="80%,20%">
    <frameset cols="50%,50%">
    <frame src="../servlet/CmdOutput">
    <frame src="../servlet/AutoMsg">
    </frameset>
    <frame src="../servlets/CLI.htm">
    </frameset>
    <html>these two servlets are almost same... but browsers take too much time to laod it
    (Except old Netscape 4.7 work fine)
    instead when i remove one frame
    <html>
    <frameset rows="80%,20%">
    <frame src="../servlet/CmdOutput">
    <frame src="../servlets/CLI.htm">
    </frameset>
    <html>this works pretty fine....
    any idea why ???????

    You can probably accomplish what you want to do using frames. JSF might also be another technology that could help here depending on how you structure your application.

  • Bdc two transactions at a time

    Hello frendz,
    How do i call two transactions in bdc simultaneously in one bdc program.
    Can anyone send me steps or document for the same(to do above process for pb10, pb30, 9005 and 9007).
    Pls help me its urgent.
    Regards,
    Ameet

    Hi ameet,
                     U can call two Transaction in BDC program by using Call transaction Method But one by one it ll process
    like :
             1. Fisrt upload ur source file it may be Excel Sheet or Text to ur program (it_data internal table)
             2. u r having recorded code (it should be seperate for each transaction)
             2. what are all the data required for First transaction u can pass and finish
             3. what are all the data required for Second transaction u can pass and finish..thats all
    Refer the following code:
    here called
    1. perform bdc_transaction using 'F-58'
    2.perform bdc_transaction using 'FBZ5'.
    *&   Report   ZPAYMENT2 For Payment with printout Data
                                      upload  Using  BDC.
    *&         Payment with printout Data upload Using  BDC.
    *&           TCODE: F-58.
    *&           METHOD: CALL TRANSACTION.
    REPORT ZPAYMENT2  no standard page heading line-size 255.
    Table Bkpf for Accounting Document Header
    Table Bsak for Clear item
    Table Bsik for open  item
    Tables:Bkpf,Bsak,Bsik,t001.
          logic   for posted
    1. User can give either reference no or Acct doc no. REference Doc
                                                     takes preceedance
    2. If REference no is gvien
    *     2.1 Fetch all the records from bkpf table with field
    *          'BUKRS' = comp code
    *          'XBLNR' = refernce doc no
    *          'BLART' = 'RE'(hardcode)
    *     2.2 Search for that accounting document(BELNR and GJAHR) for that
                       Vendor in BSAK (cleared item ) and BSIK (open item)
    *          2.2.1 if the document is not there in both tables
    *                    Show error as 'the document doesnt exists'
    *          2.2.2 if the document is there in BSAK (cleard item)
    *          Show error as ' There is no open items for the doc'
    *          2.2.3 if ther documet is there in bsik (open item)
    *          Assign the acct doc no to that record and *process it.
    *          Note : No Document will not be there in both tables.
    3. If Account doc is given
    *     3.1 if the document is not there in both tables
    *               Show error as 'the document doesnt exists'
    *     3.2 if the document is there in BSAK (cleard item)
    *               Show error as ' There is no open items for the doc'
    *     3.2 if ther documet is there in bsik (open item)
    *          Assign the acct doc no to that record and process it.
              Note : Document should be posted only when all the line
                      items are valid
          If there is any items with error then the document should not be
                                                                posted.
    INCLUDE BDC*******************************
    include zbdcinclude.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    Generated data section with specific formatting - DO NOT CHANGE  ***
    TYPES: BEGIN OF file_format,
               New_doc(2),      "1.New document
              Comp_code(4),    "2.Cmpany code
               Pay_method(1),   "3.Payment method
               Hous_bank(5),    "4.Housing bank
               Check_lot(4),    "5.Check lot
               Post_date(10),   "6.Posting date
               Doc_date(10),    "7.Document date
               ref_text(15),    "  Reference Text
               doc_htext(25),   "8.Document header text
               Branch(4),       "9.Business area (bank)
               Amount1(16),     "10.Amount in document currency
               Bank_AccTxt(50), "11.Bank account text
               Vendor_no(10),   "12.Vendor number
               Ref_doc(16),     "13.Reference document number
               Acc_docu(10),    "14.Account document number
               Partial(2),      "15.Partial payment indicator
               Pay_Amount(15),  "16.Payment amount
               Item_text(50),   "17.Item text
               Bank_no(4),      "18.Bank number
           End of file_format.
      "File format for select the account document number
    TYPES: Begin of file_format1,
             acc_doc(10),    "1.Account document number
             fiscal_lay(4),  "2.Fiscal layer
             cmp_code(4),    "3.Company code
             Ref_dno(16),    "4.Reference document number
             doc_type(2),    "5.Document type
          End of file_format1.
    TYPES: Begin of file_format2,
            acc_dno(10),    "1.Account document number
            fiscal_lay(4),  "2.Fiscal layer
           End of file_format2.
      "Work area
    TYPES: Begin of file_format3.
           include type file_format.
           include type file_format2.
    TYPES: End of file_format3.
    TYPES: Begin of l_opayf1.
           include type opayf.
    TYPES: End of l_opayf1.
    data:l_opayf type l_opayf1.
    Constants:
        comp_code(4) type c value '5000'.
    DATA: IT_Ndoc TYPE STANDARD TABLE OF file_format3,
          WA_DATATAB4  TYPE file_format3,
          print_opt    type OPAYF.
      "Work area
    DATA: WA_DATATAB1 TYPE file_format1,
          WA_DATATAB2 TYPE file_format2,
          WA_DATATAB3 TYPE file_format2.
    ******Internal table generated *****************
    DATA: IT_DATA TYPE STANDARD TABLE OF file_format,
          WA_DATATAB  TYPE file_format,
          WA_DATATABH TYPE file_format.
    DATA: IT_RAW TYPE TRUXS_T_TEXT_DATA,
          NO_OF_LINES TYPE F,
          xbelnr type bkpf-belnr.
    data:cnt type i value 1,
         status(02),
         status1(02).
    End generated data section ***
    START OF SELECTION ************
    START-OF-SELECTION.
      PERFORM LOAD_FILE_DATA.
      PERFORM REPORT_HEADER.
    PERFORM PROCESS_DATA.
      DESCRIBE TABLE IT_DATA LINES NO_OF_LINES.
          READ THE INTERNAL TABLE                                      *
            .PERFORM THE BDC.......
    *FORM PROCESS_DATA.
    LOOP AT it_data into wa_datatab.
            LINE_NO = sy-tabix.
            add 1 to line_no . "Because header is deleted from excel
    IF Wa_datatab-New_doc = 'X'.
       IF wa_datatab-New_doc = 'X' and status <> 'X' and
          status1 = 'S' and sy-tabix <> 1.
                PERFORM PROCESS_BDC.
                Status = ''.
                Status1 = ''.
                Clear   it_ndoc.
                Refresh it_ndoc.
                Clear Wa_datatabH.
       Endif.
        "Check initial screen entry and some fiels
          IF    wa_datatab-vendor_no  is initial or
               wa_datatab-comp_code  is initial or
                wa_datatab-Pay_method is initial or
                wa_datatab-Hous_bank  is initial or
                wa_datatab-Check_lot  is initial or
                wa_datatab-Amount1    is initial .
              write:/2 line_no,20 'E',25 'Enter initial screen entry first'.
              Status = 'X'.
          Else.
          "Read the header data store in work area
              READ TABLE IT_DATA INDEX CNT INTO Wa_datatabH.
                perform validate_data1.
          ENDIF.
    ELSE.
                perform validate_data2.
        "Allow onely partial partial payment
         IF wa_datatab-Partial = 'X' or wa_datatab-Partial = 'x'.
              IF   Wa_datatab-ref_doc    is initial and
                   wa_datatab-acc_docu    is initial.
              write:/2 line_no,20 'E',25 'Enter ref_no or acc_no'.
              Status = 'X'.
              ELSE.
        "Select the document number from account heaser table(bkpf)
            IF not wa_datatab-ref_doc is initial.
    select  single belnr gjahr bukrs xblnr blart from bkpf into wa_datatab1
                                    where ( blart = 'RE' or blart = 'KR' )
                                                   and
                                         bukrs =  comp_code and
                                         xblnr =  wa_datatab-ref_doc.
            Else.
                IF not wa_datatab-acc_docu is initial.
    select  single belnr gjahr bukrs xblnr blart from bkpf into wa_datatab1
                                     where ( blart = 'RE' or blart = 'KR' )
                                                    and
                                          bukrs =  comp_code and
                                          belnr =  wa_datatab-acc_docu.
                ENDIF.
            ENDIF.
       "Check the document number is exist or not in acc header(bkpf)
           IF wa_datatab1-acc_doc is initial.
              write:/2 line_no,20 'E',25 'The document doesnot exit',
                       wa_datatab1-acc_doc.
              status = 'X'.
            Else.
       "Select the document number from clear item table(bsak)
              select single belnr gjahr from bsak into wa_datatab2
                        where lifnr = wa_datatabH-vendor_no     and
                              gjahr = wa_datatab1-fiscal_lay   and
                              belnr = wa_datatab1-acc_doc      and
                              bukrs = comp_code.
      "Select the document number from open item table(bsik)
              select single belnr gjahr from bsik into wa_datatab3
                        where lifnr = wa_datatabH-vendor_no     and
                              gjahr = wa_datatab1-fiscal_lay   and
                              belnr = wa_datatab1-acc_doc      and
                              bukrs = comp_code.
       "Check the document number is exist or not  in both table
            IF ( wa_datatab2-acc_dno is initial OR
                 wa_datatab2-fiscal_lay is initial ) and
                ( wa_datatab3-fiscal_lay   is initial OR
                 wa_datatab3-acc_dno  is initial ).
                write:/2 line_no,20 'E',25 'The document doesnot exit',
                         wa_datatab1-acc_doc.
                status = 'X'.
              Else.
      "Check the document number is exist or not in clear item table(bsak)
                IF not wa_datatab2-acc_dno  is initial and
                   not wa_datatab2-fiscal_lay is initial.
         write:/2 line_no, 'E',25 'There is no open items for the document',
                           wa_datatab1-acc_doc.
                  status = 'X'.
                Else.
      "Check the document number is exist or not in open item table(bsik)
                     IF not wa_datatab3-acc_dno    is initial and
                        not wa_datatab3-fiscal_lay is initial.
                        Status1 = 'S'.
                    move-corresponding  wa_datatab  to wa_datatab4.
                    move-corresponding  wa_datatab3 to wa_datatab4.
                       APPEND wa_datatab4 to IT_NDOC.
                     ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
          ENDIF.
      ENDIF.
    ENDIF.
        CLEAR wa_datatab.
        CLEAR wa_datatab1.
        CLEAR wa_datatab2.
        CLEAR wa_datatab3.
        CLEAR wa_datatab4.
        add 1 to cnt.
      ENDLOOP.
    *ENDFORM.
    IF status <> 'X' and status1 = 'S'.
    PERFORM  PROCESS_BDC.
    Endif.
    PERFORM WRITE_ERR_FILE.
         FORM PROCESS_BDC.
    FORM PROCESS_BDC.
    DATA:
          search_line(2) type n,
          search_line1(2) type n,
          FIELD_NAME(20) TYPE C,
          line_indx(3) type n.
          add 1 to line_indx.
           perform bdc_dynpro      using 'SAPMF05A' '0129'.
           perform bdc_field       using 'BDC_OKCODE'
                                         '/ENV'.
           perform bdc_field       using 'BDC_CURSOR'
                                         'BSEG-WRBTR'.
           perform bdc_dynpro      using 'SAPMF05A' '0130'.
           perform bdc_field       using 'BDC_CURSOR'
                                         'OPAYF-PSTAP'.
           perform bdc_field       using 'BDC_OKCODE'
                                         '=MW'.
           perform bdc_field       using 'OPAYF-BUKRS'
                                      comp_code.
           perform bdc_field       using 'OPAYF-RZAWE'
                                      wa_datatabH-Pay_method.
           perform bdc_field       using 'OPAYF-HBKID'
                                      wa_datatabH-Hous_bank.
           perform bdc_field       using 'OPAYF-PSTAP'
                                      wa_datatabH-Check_lot.
           perform bdc_dynpro      using 'SAPMF05A' '0129'.
           perform bdc_field       using 'BDC_CURSOR'
                                         'BKPF-XBLNR'.
           perform bdc_field       using 'BDC_OKCODE'
                                         '=PA'.
           perform bdc_field       using 'BKPF-BLDAT'
                                      wa_datatabH-Doc_date.
           perform bdc_field       using 'BKPF-BUDAT'
                                      wa_datatabH-Post_date.
           perform bdc_field       using 'BKPF-XBLNR'
                                      wa_datatabH-ref_text.
           perform bdc_field       using 'BKPF-BKTXT'
                                      wa_datatabH-doc_htext.
           perform bdc_field       using 'BSEG-WRBTR'
                                      wa_datatabH-Amount1.
           perform bdc_field       using 'BSEG-GSBER'
                                      Wa_datatabH-Branch.
           perform bdc_field       using 'BSEG-SGTXT'
                                      wa_datatabH-Bank_AccTxt.
           perform bdc_field       using 'OPAYF-LIFNR'
                                     wa_datatabH-vendor_no.
         perform bdc_field       using 'RF05A-XPOS1(01)'
                                        record-XPOS1_01_012.
           perform bdc_field       using 'RF05A-XPOS1(03)'
                                         'X'.
           perform bdc_dynpro      using 'SAPMF05A' '0730'.
           perform bdc_field       using 'BDC_CURSOR'
                                         'RF05A-VONWT(01)'.
           perform bdc_field       using 'BDC_OKCODE'
                                         '=SL2'.
           perform bdc_dynpro      using 'SAPMF05A' '0608'.
           perform bdc_field       using 'BDC_CURSOR'
                                         'RF05A-XPOS1(04)'.
           perform bdc_field       using 'BDC_OKCODE'
                                         '=ENTR'.
         perform bdc_field       using 'RF05A-XPOS1(01)'
                                    record-XPOS1_01_010.
           perform bdc_field       using 'RF05A-XPOS1(04)'
                                         'X'.
         Enter item document number in search screen
           perform bdc_dynpro      using 'SAPMF05A' '0731'.
           perform bdc_field       using 'BDC_CURSOR'
                                         'RF05A-SEL01(01)'.
         Loop at IT_NDOC into wa_datatab4.
          add  1 to search_line.
          CONCATENATE 'RF05A-SEL01(' search_line  ')' INTO FIELD_NAME.
          perform bdc_field       using FIELD_NAME
                                        wa_datatab4-acc_dno.
          if search_line = 10.  "if items are more than 10
            perform bdc_field       using 'BDC_OKCODE'
                                          '/00'.
            perform bdc_dynpro      using 'SAPMF05A' '0731'.
            perform bdc_field       using 'BDC_CURSOR'
                                          'RF05A-SEL01(01)'.
            search_line = 0.
          endif.
        Endloop.
           perform bdc_field       using 'BDC_OKCODE'
                                         '=PA'.
         Enter the amount of partial payments
           perform bdc_dynpro      using 'SAPDF05X' '3100'.
           perform bdc_field       using 'BDC_OKCODE'
                                        '=PART'.
           search_line = 1.
       Loop at IT_NDOC into wa_datatab4
                where  Partial = 'X' or  Partial = 'x'.
           search_line = sy-tabix.
                      "select the item as first item
           perform bdc_dynpro      using 'SAPDF05X' '3100'.
           perform bdc_field       using 'BDC_OKCODE'
                                         '/00'.
           perform bdc_field       using 'RF05A-ABPOS'
                                          search_line.
           perform bdc_dynpro      using 'SAPDF05X' '3100'.
           perform bdc_field       using 'BDC_OKCODE'
                                               '/00'.
           perform bdc_field       using 'DF05B-PSZAH(01)'
                                        wa_datatab4-Pay_Amount.
       Endloop.
        Simulate the all
          perform bdc_dynpro      using 'SAPDF05X' '3100'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=BS'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-PSZAH(01)'.
       Give the line number and Item text
    Loop at IT_NDOC into wa_datatab4.
           add 1 to line_indx.
       Click the detial icon
         perform bdc_dynpro      using 'SAPMF05A' '0700'.
         perform bdc_field       using 'BDC_CURSOR'
                                       'RF05A-NEWBS'.
         perform bdc_field       using 'BDC_OKCODE'
                                      '=PI'.
       Chose the line item
         perform bdc_dynpro      using 'SAPMF05A' '0610'.
         perform bdc_field       using 'BDC_CURSOR'
                                      '*BSEG-BUZEI'.
         perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
         perform bdc_field       using '*BSEG-BUZEI'
                                        line_indx.
        Enter the text and click document over view (AB)
         perform bdc_dynpro      using 'SAPMF05A' '0302'.
         perform bdc_field       using 'BDC_CURSOR'
                                       'BSEG-SGTXT'.
         perform bdc_field       using 'BDC_OKCODE'
                                       '=AB'.
         perform bdc_field       using 'BSEG-SGTXT'
                                  wa_datatab4-Item_text.
    Endloop.
    *Save or post
        perform bdc_dynpro      using 'SAPMF05A' '0700'.
        perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-NEWBS'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=BU'.
      perform bdc_field       using 'BDC_OKCODE'
                                     '=D'.
        perform bdc_transaction using 'F-58'.
        get parameter id 'BLN' field xbelnr.
      inserted by ganesh*******************
      perform bdc_dynpro      using 'SAPMFCHK' '0750'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'OPAYF-PSTAP'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=DRUK'.
      perform bdc_field       using 'BKPF-BELNR'
                                        xbelnr.
      perform bdc_field       using 'OPAYF-BUKRS'
                                       '5000'.
      perform bdc_field       using 'BKPF-GJAHR'
                                    wa_datatab4-fiscal_lay.
      perform bdc_field       using 'OPAYF-RZAWE'
                                   wa_datatabH-Pay_method.
      perform bdc_field       using 'OPAYF-PSTAP'
                                   wa_datatabH-Check_lot.
    l_opayf-bukrs = '5000'.
    l_opayf-PPRIZ = 'DEFA'.
    l_opayf-PPRIA = 'DEFA'.
    l_opayf-PSTAP =  wa_datatabH-Check_lot.
    l_opayf-PSOFO = 'X'.
    l_opayf-RZAWE = wa_datatabH-Pay_method.
    *CALL FUNCTION 'FORM_PRINT_AFTER_POSTING'
        EXPORTING
             i_belnr      = xbelnr
             i_gjahr      = wa_datatab4-fiscal_lay
             i_opayf      = L_OPAYF
            I_REPRI      =
       EXCEPTIONS
            ADDR_MISSING = 1
            CANCEL       = 2
            OTHERS       = 3
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
       loop at   YT042I.
       endloop.
    *CLEAR L_OPAYF.
    perform bdc_dynpro      using 'SAPLF028' '0101'.
    perform bdc_field       using 'OPAYF-ABPOS'
                                  wa_datatabH-Bank_no.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=PI'.
    perform bdc_dynpro      using 'SAPLF028' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'T042I-HBKID(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=PI'.
    perform bdc_dynpro      using 'SAPMFCHK' '0750'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '/n'.
    perform bdc_dynpro      using 'SAPMFCHK' '0750'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '/n'.
      perform bdc_transaction using 'FBZ5'.
        if not xbelnr is initial.
          clear allmessages.
          allmessages-line_no = line_no.
          allmessages-msg_type = 'S'.
          concatenate
             'Document '
             xbelnr
             ' created successfully.'
          into
             allmessages-msg_desc.
          append allmessages.
          perform write_to_screen.
         perform print_cheque.
        endif.
        clear xbelnr.
        set parameter id 'BLN' field xbelnr.
    ENDFORM.
          FORM HEADER_DETAILS                                           *
    FORM REPORT_HEADER.
      new-line.
      uline.
      WRITE :  AT 10 '  BDC to upload Custemer master data Extending',
                  70 'Date : ',
                  80 SY-DATUM.
      NEW-LINE.
      WRITE : AT 70 'Time : ',
                 80 SY-UZEIT.
      uline.
      WRITE : AT 2 ' LINE NO  ',
                15 'MSG TYPE  ',
                25 '     DESCRIPTION'.
      ULINE.
    ENDFORM.
       FORM LOAD FILE DATA
    FORM LOAD_FILE_DATA.
      refresh: IT_DATA,
               ALLMESSAGES.
      clear: IT_DATA,
             ALLMESSAGES.
      data: IT_RAW TYPE TRUXS_T_TEXT_DATA.
    Load the GL Master File to the Internal table
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
         EXPORTING
        I_FIELD_SEPERATOR        =
           i_line_header            =  'X'
           i_tab_raw_data           =  it_raw       " WORK TABLE
           i_filename               =  p_file
         TABLES
           i_tab_converted_data     = IT_DATA[]    "ACTUAL DATA
        EXCEPTIONS
           conversion_failed        = 1
           OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        STOP.
      ENDIF.
    ENDFORM.
       FORM convert into internal format (unpack)
    form convert_internal changing field.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
           EXPORTING
                INPUT  = field
           IMPORTING
                OUTPUT = field.
    endform.
       FORM validate data
    form validate_data1.
      perform convert_internal changing wa_datatabh-vendor_no.
    perform convert_internal changing wa_datatabh-COMP_CODE.
    endform.
    form validate_data2.
    perform convert_internal changing wa_datatab-ref_doc.
    perform convert_internal changing wa_datatab-Acc_docu.
    endform.
       FORM WRITE ERROR MESSAGE TO SCREEN
    FORM WRITE_TO_SCREEN.
    NEW-LINE.
    write : AT  2 line_no ,
            AT 25 ALLMESSAGES-MSG_DESC.
            IF ALLMESSAGES-MSG_TYPE = 'E'.
              WRITE: AT 17 ALLMESSAGES-MSG_TYPE COLOR COL_NEGATIVE.
            ELSE.
              WRITE: AT 17 ALLMESSAGES-MSG_TYPE.
            ENDIF.
    ENDFORM.
       FORM WRITE ERROR MESSAGE TO SCREEN
    form print_cheque.
      clear print_opt.
      print_opt-BUKRS = comp_code.
      print_opt-RZAWE = wa_datatabH-Pay_method.
      print_opt-HBKID = wa_datatabH-Hous_bank.
      print_opt-PSTAP = wa_datatabH-Check_lot.
      print_opt-PPRIZ = 'DEFA'.  "default printer
      print_opt-PPRIA = 'DEFA'.  "default printer
      print_opt-PSOFO = 'X'.  "print imm
      print_opt-PESPR = 'X'.  "Text in receipient lang
      print_opt-LIFNR = wa_datatabH-vendor_no.
      select single * from t001 where bukrs = comp_code.
    CALL FUNCTION 'GL_ACCOUNT_FOR_PAYMENT'
         EXPORTING
              I_BUKRS = comp_code
              I_HBKID = wa_datatabH-Hous_bank
              I_LAND1 = t001-land1
              I_WAERS = 'INR'
              I_ZLSCH = wa_datatabH-pay_method.
       IMPORTING
            E_HKONT =
            E_HKTID =
    CALL FUNCTION 'PAYMENT_FORM_PRINT'
         EXPORTING
              I_OPAYF = print_opt
              I_VBLNR = xbelnr
    endform.
    Regards,
    ganesh

  • Two transaction variant do not working for a user

    Hi Gurus
    I have created two Z t code and made transaction variant through T Code SHD0 and assigned these two ZTcode to a user. now when a user is running the Ztcode screen variant is active on only one. when i assign second one to  the user again than screen variant of first ZT code do not work.
    can any one tell me why system is doing so.
    Regards
    Shiv

    Hi, I have the same situation. Can you please help how your case got solved ?
    Basically I have created two transaction variants- one for XD02, the other for XD03. When I am trying to assign a user to both these transaction variants ( using SET PROPOSAL), only one is getting assigned, other is getting deactivated. Please help.

  • Two script in one driverprogram

    can tell me the scenario with
    function module to write two script in one driverprogram
    Edited by: Alvaro Tejada Galindo on Jan 30, 2008 4:19 PM

    Hi,
      These are following steps to call two forms in one driver program.
    1. call funtion open_form FM.
    2. call function start_form FM.
       specify the first form name and page number of form to be called first.
    3. call write_form to put data into form.
    4. call function end_form.
    5. call funtion start_form.
        specify the second form  name and page number of form to be called second.
    6.call write_form.
    7. call function end_form.
    8. finally call funtion close_form.
    try this , i hope it will help u
    Thanks & Regards
    sathish

  • Calling mulitple transactions in bdc

    sir,
    i m trying to upload data into sap system through BDC Call transaction method.I want to insert data into two transactions throgh same abap program.Plz help me how i sholud call two transactions and what bout internal tables for these two different transactions, plz attach if u have any code .
    thanks
    aafaq

    Hi
    What is the confustion here.
    Build the data
    Call the first transaction
    Build the data again (for the second transaction)
    Call the second transaction.
    There will not be any difference execpt for the BDCDATA you building.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • There are two transactions ZJPVCS303 and ZJPVCS303_US for one single Report

    When run as a batch program, (currently this is the case), or withT-Code ZJPVCS303 the selection screen is unchanged (except for additional sales area above)
    - When run as T-Code ZJPVCS303_UL (UL stands for Upload) the selection screen is changed.  The unix file option is no longer available, and the user is able to upload a local file (in the same format as the current unix file, but tab delimited) to the program for processing.
    Requirements:
    There are two transactions ZJPVCS303 and ZJPVCS303_US for one single Report.
    ->When ZJPVCS303 Transaction is executed, the file is uploaded from the Application
      server to SAP R/3. The selection screen parameters would be:
      Logical Filename:
      Sales Organization:
      Distribution Channel:
      Division:
    ->When ZJPVCS303_US Transaction is executed, the file is uploaded from the Presentation Server
      to SAP R/3. When this transaction is executed, it should not have the 'Logical
      Filename' parameter anymore on the selection-screen. Instead it should only have
      Local File name on the presentation server:
      Sales Organization:
      Distribution Channel:
      Division:
        The same thing is applicable for the other transaction ZJPVCS303. When transaction ZJPVCS303
    is executed, it should not have the 'Local Filename' parameter anymore on the selection-screen. Instead it should only have
    Logical Filename:
    Sales Organization:
    Distribution Channel:
    Division:
    So how should I make these parameters invisible depending on the transaction codes execution.
    I have an idea of using MODIF ID, LOOPING AT SCREEN...MODIFY SCREEN.
    I have an idea of using SY-TCODE.
    EX:
    AT SELECTION-SCREEN OUTPUT.
    IF SY-TCODE = 'ZJPVCS303'.
    LOOP AT SCREEN.
    IF SCREEN-GROUPID = 'GRP'.
       SCREEN-INPUT   = 0.
       SCREEN-INVISIBLE = 1.
       MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ELSEIF SY-TCODE = 'ZJPVCS303_US'.
    LOOP AT SCREEN.
    IF .....
    ENDLOOP.
    ENDIF.
    ENDIF.
    But I am not able to get the output which I require. Please help me out.

    Hello Rani
    Basically the transaction determines whether upload starts from application server (AS) or presentation server (PC). Thus, you will have the following parameter:
    PARAMETERS:
      p_as_fil          TYPE filename   MODIF ID unx,  " e.g. Unix server
      p_pc_fil          TYPE filename   MODIF ID wnd.  " e.g. Windows PC
    AT SELECTION-SCREEN OUTPUT.
      CASE syst-tcode.
    *   transaction(s) for upload from server (AS)
        WHEN 'ZJPVCS303.
          LOOP AT screen.
            IF ( screen-group1 = 'UNX' ).
              screen-input = 0.
              screen-invisible = 1.
              MODIFY screen.
            ENDIF.
          ENDLOOP.
    *   transaction(s) for upload from local PC (PC)
        WHEN 'ZJPVCS303_US.
          LOOP AT screen.
            IF ( screen-group1 = 'WND' ).
              screen-input = 0.
              screen-invisible = 1.
              MODIFY screen.
            ENDIF.
          ENDLOOP.
       WHEN others.
       ENDCASE.
    Regards
      Uwe

  • TS3367 I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling m

    I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling mine.

    Each device needs a separate address. Use an email address (gmail.com) on the iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
     Cheers, Tom

  • Saving data into two tables "in one transaction"

    Hello everybody!
    My scenario is the following: SAP PI receives message containing some data (header and MULTIPLE details data in one message) and has to transfere this data to a database.
    In the database there are two tables for storing the data contained in the message: one for HEADER data and one for DETAILS data. I need to save all the data (header and MULTIPLE details data) into these two tables "in one transaction" and roll back saving of HEADER data and DETAILS data if saving of some DETAILS data has failed.
    I am going to use receiver JDBC adapter for this purpose.
    My questions are:
    1. How can I save all the data "in one transaction"? Will it work if I transform the source message into the target message which looks something like this?
    <root>
      <StatementName1>
        <dbTableName action=u201CUPDATE_INSERTu201D>
        <table>HEADER_table</table>
        <access>
        <col1>val1</col1>
        <col2>val2</col2>
        </access>
        <key1>
        <col1>val1</col1>
        </key1>
        </dbTableName>
      </StatementName1>
      <StatementName2>
        <dbTableName action=u201CUPDATE_INSERTu201D>
        <table>DETAILS_table</table>
        <access>
        <col1>val1</col1>
        <col2>val3</col2>
        </access>
        <key1>
        <col1>val1</col1>
        </key1>
        </dbTableName>
      </StatementName2>
      <StatementName3>
        <dbTableName action=u201CUPDATE_INSERTu201D>
        <table>DETAILS_table</table>
        <access>
        <col1>val1</col1>
        <col2>val4</col2>
        </access>
        <key1>
        <col1>val1</col1>
        </key1>
        </dbTableName>
      </StatementName3>
    </root>
    2. How to roll back saving of HEADER data in the case of saving of DETAILS data has failed?
    3. What will be the response structure returned by database look like in the case of success?
    Thanks,
    Vika

    I guess the response in my case will be something as following?
    <response>
    <Statement1_response>
    <row>
    <update_count>1</update_count>
    <insert_count>0</insert_count>
    </row>
    </Statement1_response>
    <Statement2_response>
    <row>
    <update_count>0</update_count>
    <insert_count>1</insert_count>
    </row>
    <row>
    <update_count>0</update_count>
    <insert_count>1</insert_count>
    </row>
    </Statement2_response>
    </response>
    Vika

  • Can we record two transactions and use for  a Call-transaction BDC?

    can we record two transactions and upload data using Call-transaction method in BDC ?IF not why?

    Hi Prakash,
    Here i used two transactions.
    REPORT zra_gl_cr NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPE-POOLS: truxs.
    DATA: it_raw TYPE truxs_t_text_data.
    DATA:messtab1 LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA:messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF i_mess OCCURS 0,
      l_mstring(480),
      msgnr(5),
      msgv1(15),
      END OF i_mess.
    DATA:i_mess1 LIKE i_mess OCCURS 0 WITH HEADER LINE.
    DATA: l_mstring(480),l_mstring1(480).
    DATA: BEGIN OF it_itab OCCURS 0,
          saknr(10),    "G/L a/c number.
          bukrs(4),     "Company Code.
          ktoks(4),     "G/L a/c group.
          xplacct(1),   "P&L statement account.
          xbilk(1),     "Balance sheet account.
          txt20_ml(20), "G/L a/c short text.
          txt50_ml(50), "G/L a/c long text.
          waers(5),     "Account currency.
          MWSKZ(2),
          mitkz(1),     "Reconciliation a/c for a/c type.
          xopvw(1),     "Open item management
          xkres(1),     "Line item display.
          zuawa(3),     "Sort Key.
          fstag(4),     "Field status group.
          xintb(1),     "Post automatically only.
          hbkid(5),     "House bank.
          hktid(5),     "Account id.
          vzskz(2),     "Interest indicator
          END OF it_itab.
    DATA: hdate LIKE sy-datum.
                          Selection Screen                       *****
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(15) text-103. " FOR FIELD P_FILE1.
    SELECTION-SCREEN POSITION 25.
    PARAMETERS : p_file1 LIKE rlgrap-filename.
    SELECTION-SCREEN END OF LINE.
                          Initialization                         *****
    INITIALIZATION.
                       At Selection Screen                       *****
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
    Perform file_selection will help to select the location of the file
      PERFORM file_selection.
                       Start-Of-Selection                        *****
    START-OF-SELECTION.
    Perform data_upload will help to upload the data from the flat file
    to the internal table.
      PERFORM data_upload.
    PERFORM open_group.
       Peform bdc_upload will help to upload the data from the internal
       table into its respective fields.
    PERFORM bdc_fspo.
      PERFORM bdc_upload.
      PERFORM exp_log.
    PERFORM close_group.
       Perform display_log will prepare a log for the data that has been
       uploaded
       PERFORM display_log.
                        End-Of-Selection                           ****
    END-OF-SELECTION.
    *&      Form  file_selection
          To select the location of the file
    FORM file_selection .
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = ' '
          def_path         = 'C:\'
          mask             = ',.txt,.xls.'
          mode             = 'O'
          title            = 'Open a excel file'
        IMPORTING
          filename         = p_file1
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    ENDFORM.                    " file_selection
    *&      Form  data_upload
         To upload the data from the file location to the internal table.
    FORM data_upload .
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw
          i_filename               =  p_file1
        TABLES
          i_tab_converted_data     = it_itab
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " data_upload
    *&      Form  bdc_upload
    To upload the data from the internal table into its respective fields.
    FORM bdc_upload .
      LOOP AT it_itab.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ACC_CRE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_KEY-SAKNR'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                  it_itab-SAKNR.
    perform bdc_field       using 'GLACCOUNT_SCREEN_KEY-BUKRS'
                                  it_itab-BUKRS.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=2102_GROUP'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                  it_itab-XPLACCT.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=2102_BS_PL'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-XBILK'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                 it_itab-XPLACCT.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                  it_itab-XBILK.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                  it_itab-XBILK.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                  it_itab-TXT20_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                 it_itab-TXT50_ML.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-BILKT'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                  it_itab-saknr.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=TAB02'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-KTOKS'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                       it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                       it_itab-txt20_ml.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                       it_itab-txt50_ml.
        perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-BILKT'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                  it_itab-saknr.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB02'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                     it_itab-KTOKS.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                 it_itab-XBILK.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                  it_itab-TXT20_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                  it_itab-TXT50_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                 it_itab-saknr.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  it_itab-waers.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  it_itab-MWSKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-mitkz.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-XOPVW'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                  it_itab-XOPVW.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                  it_itab-XKRES.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                 it_itab-ZUAWA.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                       it_itab-xbilk.
           IF it_itab-xbilk = 'X'.
       PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=TAB03'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'GLACCOUNT_SCREEN_CCODE-WAERS'.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                      it_itab-waers.
         PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                  it_itab-xopvw.
         PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-mitkz.
       ENDIF.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                      it_itab-xkres.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                      it_itab-zuawa.
       PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=SAVE'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'GLACCOUNT_SCREEN_CCODE-FSTAG'.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                      it_itab-fstag.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
                                      it_itab-xintb.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-HBKID'
                                      it_itab-hbkid.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-HKTID'
                                      it_itab-hktid.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-VZSKZ'
                                      it_itab-vzskz.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB03'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-WAERS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  it_itab-WAERS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  it_itab-MWSKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-MITKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                 it_itab-ZUAWA.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                 it_itab-FSTAG.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                  it_itab-FSTAG.
       PERFORM bdc_transaction USING 'FS00'.
        CALL TRANSACTION 'FS00' USING bdcdata MODE 'A'
                                              UPDATE 'S'
                                             MESSAGES  INTO messtab1.
        PERFORM mess1.
        REFRESH bdcdata[].
      ENDLOOP.
    ENDFORM.                    " bdc_upload
    *&      Form  bdc_fspo
          text
    FORM bdc_fspo .
      LOOP AT it_itab.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ACC_CRE'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_KEY-SAKNR'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                      it_itab-saknr.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-KTOPL'
                                      '1000'.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=2102_GROUP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-KTOKS'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                      it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                      it_itab-xbilk.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                       it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-TXT50_ML'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                       it_itab-txt20_ml.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                       it_itab-txt50_ml.
    *perform bdc_transaction using 'FSP0'.
        CALL TRANSACTION 'FSP0' USING bdcdata MODE 'A'
                                              UPDATE 'S'
                                             MESSAGES  INTO messtab.
        PERFORM mess.
        REFRESH bdcdata[].
      ENDLOOP.
    ENDFORM.                    " bdc_fspo
    *&      Form  mess
          text
    -->  p1        text
    <--  p2        text
    FORM mess .                                                 "fsp0
      LOOP AT messtab.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = messtab-msgid
            lang      = messtab-msgspra
            no        = messtab-msgnr
            v1        = messtab-msgv1
            v2        = messtab-msgv2
            v3        = messtab-msgv3
            v4        = messtab-msgv4
          IMPORTING
            msg       = l_mstring
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        CONDENSE l_mstring.
        i_mess1-l_mstring = l_mstring(250).
        i_mess1-msgnr = messtab1-msgnr.
        i_mess1-msgv1 = messtab1-msgv1.
        APPEND i_mess1.
      ENDLOOP.
    ENDFORM.                    " mess
    *&      Form  mess1
          text
    -->  p1        text
    <--  p2        text
    FORM mess1 .                                                "fs00
      LOOP AT messtab1.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = messtab1-msgid
            lang      = messtab1-msgspra
            no        = messtab1-msgnr
            v1        = messtab1-msgv1
            v2        = messtab1-msgv2
            v3        = messtab1-msgv3
            v4        = messtab1-msgv4
          IMPORTING
            msg       = l_mstring1
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        CONDENSE l_mstring1.
        i_mess-l_mstring = l_mstring1(250).
        i_mess-msgnr = messtab1-msgnr.
        i_mess-msgv1 = messtab1-msgv1.
        APPEND i_mess.
      ENDLOOP.
    ENDFORM.                                                    " mess1
    *&      Form  exp_log
          text
    -->  p1        text
    <--  p2        text
    FORM exp_log .
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'c:\temp\error_fsp0.txt'
          filetype = 'DAT'
        TABLES
          data_tab = i_mess1.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'c:\temp\error_fs00.txt'
          filetype = 'DAT'
        TABLES
          data_tab = i_mess.
    ENDFORM.                    " exp_log
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_Field
    ********Rewards some points.

  • Stateless session's one method to call  two bmp's create method

    JSP calls one stateless session's one method and the method calls two bmps'
              create method.
              However, When the second bmp run the create operation, the exception
              happens.
              But the date that the first bmp insert is not rollbacked.
              How can I rollback all data, when the exception happens?
              

    Use JSP actions.
    <jsp:useBean id="shoppingCart" class="com.package.Cart" scope="session">
    <jsp:setProperty name="shoppingCart" property="userName" value="Guest" />
    </jsp:useBean>

  • How to send two commands within one URL call

    Hey gurus,
    I was wondering if it is possible to concatenate two commands in one url call:
    SAPBWOpenURL(SAP_BW_URL_Get() &DATA_PROVIDER=DATAPROVIDER_1
    &CMD=EXCHANGE
    &IOBJNM_2=GROUP1
    &IOBJNM_1=GROUP2
    &FILTER_SIGN_1=E
    &FILTER_VALUE_1=
    &CMD=REMOVE_FILTER
    &IOBJNM=GROUPX);
    The URL should exchange 2 infoobjects and remove the filter of one specified.
    Can anyone help me out?
    Thanks,
    Andreas

    Thank you Chandran - you saved my day
    Will dedicate this day to you
    Cheers,
    Andreas

Maybe you are looking for