R/3 Transactions into VC

Hello,
I would like to integrate some R/3 transactions into VC. I was going to create a set of iViews using SAP GUI for HTML and point them to the relevent transactions. Next, I would like to create a form and embed some pushbuttons, the idea being that our end users use these pushbuttons which 'point' to the R/3 transactions as an alternaive to their SAP standard 'favourites' menu.
My question is this - how do I link the form pushbuttons to the R/3 transaction iviews that I have already defined? Also, do I need to embed them into a VC HTML view first?
Thanks,
Richard.

Yes, I will advise an HTML view.
But keep in mind that HTML views can´t be used within nested iviews.
http://YOUR-SYSTEM/portal/prtroot/com.sap.portal.appintegrator.sap.Transaction?System=ECCCLNT800&TCode=VA02&GuiType=WebGui&DynamicParameter=VBAK-VBELN="&@Order_Number&"&OkCode=ENT2
This works for me:
An alternative URL syntax would be:
"pcd!3aportal_content!2fcom.sap.pct!2ftemplates!tftemplates!2fiviews!2fcom.sap.portal.sap_transaction_iview?System=SAP_R3&TCode=XXX&GuiType=WebGUI!&DynamicParameter=VBAK-VBELN%3D" & @Order_Number & " & OkCode=ENT2"
Notice:
!3a Is a replacement for :
!2f for /
%3D equals =
Here you have to replace XXX in TCode with your desired transaction
and if you want to parse a Dynamic Order Number from VC - this is the part for DynamicParameter (otherwise just skip that part. Hope that helps,
otherwise feel free to write to me personally
jad_at_invendium.com

Similar Messages

  • How to integrate 2 diff transactions into one

    Hi All,
    I have a requirement to combine trasaction FBPM(SAPFPAYM) & Z_ACHEMAIL(RFFOAVIS_FPAYM) transactions into single transaction i.e As soon as the file is released through transaction code FBPM then the email notifications should be sent automatically(RFFOAVIS_FPAYM).
    But when i try to use
    call trasaction FBPM.
    call trasaction Z_ACHEMAIL. One after other in my z program its not executing both at a time since both are having diff selection screen. its only executing FBPM transaction, its unbling me to press back button to get into Z_ACHEMAIL AND again i need to execute.So please let me know ur ideas how can i achieve this.
    Thanks in advance.
    Regards,
    Rajesh

    Hi Vishal,
    You could try using the SUBMIT statement. Through this statement you can pass parameters to the selection screen of the second transaction, however instead of the name of the transaction you'll need to pass the name of the program. Check the documentation for more detail.
    Hope it helps.
    Regards,
    Gilberto Li

  • How to get the material list displayed in CU50 transaction into ABAP report

    How to get the 'KMAT" type material list displayed in CU50 transaction into ABAP report?
    I am getting the entire BOM when i am using the FM CS_BOM_EXPL_MAT_V2 in to the table in the report.
    But I want only the material list displayed in CU50.

    Hi,
    Could you please tell us how you found a solution to your problem?
    Thanks & regards
    Hassan

  • Invoice A/R Payment Split Transaction into Several GL Accounts

    Hi,
    I got following message from SAP Support:
    The SplitTransaction property is not included in product develop plan by now.
    By SAP Note 1028874, we would like to ask you to post your requirement in our SAP Business One Product Development Collaboration forum and not via message:
    /community [original link is broken]
    Please refer to Note 1028874 for more information.
    ISSUE
    Sample 2, Bank transaction:
    I have build a Payment routine in Invoice A/R.
    I am doing a Bank transfer in Payments regarding payment with Interact (direct Payment from Bank
    account)
    Here in Canada you have the possibility to withdraw money: Sample invoice cost $100, you can pay
    $200 and receive $100 in cash.
    Sample I like to do:
    GL Account A $200 (Account Number, Debit )
    GL Account B $100 (Account Number, Credit)
    GL Account C $100 (Business Partner, Credit)
    Any suggestion?
    In the Payment describtion I can do a  vPay.SplitTransaction = 0; but this is not working according to SAP Support.
    SUMMARY
    I like to do a payment and Split the Transaction into several accounts; like Journal Entry with reconciliation of the Journal Entry and the Invoice.
    Thank you,
    Rune

    Hi Peter,
    I do not want you to promote the future code; but the code in SDK as today.
    Sample, it would look something like the code below from SDK help code; but please change the code to work as your sample.
    Thank you,
    Rune
    vPay.Invoices.AppliedFC = 0
    vPay.Invoices.AppliedSys = 0
    vPay.Invoices.DocEntry = 8
    vPay.Invoices.DocLine = 0
    vPay.Invoices.DocRate = 0
    vPay.Invoices.InvoiceType = 13
    vPay.Invoices.LineNum = 0
    vPay.Invoices.SumApplied = 5031.2
    Call vPay.Invoices.Add
    vPay.CardCode = vmp_CardCode_string;
    vPay.DocDate = DateTime.Now;
    vPay.JournalRemarks = "Incoming - Payment Bank Transfer";
    vPay.TaxDate = DateTime.Now;
    vPay.TransferAccount = vmp_BankAccount_string;// "_SYS00000000343";
    vPay.TransferDate = DateTime.Now;
    vPay.TransferReference = vmp_CardCode_string;
    vPay.TransferSum = vmp_Amount_double;
    vc_Message_Result_Int32 = vPay.Add();

  • Importing Sales Transactions into Oracle Financials

    I have a customer who is planning to use Oracle Financials as their finance solution, but we need to auto-feed the sale transactions from the sales system. These transactions corresponds (loosely speaking) to sales (or purchase) orders and delivery order. We have the ability to reformat the data (if necessary) to any format or through most interfaces (ODBC, XML, etc).
    I just do not know enough about Oracle Financial to determine the appropriate format and connectivity.
    I read on the Oracle Financial product page that it is possible to integrate that solution with third party solution - but there is hardly any other information available. So,
    1. Has anyone done similar integration before ?
    2. If so, can you kindly offer some advice - where (or whom) should I go next for more information ?
    Thanks and best regards
    Lai Hock

    Hello:
    Project's activity management gateway (AMG) is the means to
    import transactions into projects. This includes creating
    tasks, budgets etc. For importing/recording commitments there
    is a table that needs to be created and a view that needs to be
    modified to show external commitments within projects (I believe
    the view is named something like
    PA_External_system_commitments_view)
    Robert

  • What design to split bank transactions into more detail? (in budget database)

     Current Design:
    * I have a budget/finance tracking database I’m building
    * It has a BANK_TRANSACTIONS table where I load in transactions from various bank accounts
    * It there has an ALLOCATIONS table to allocation a bank transaction to a business area (e.g. allocate the phone bill item 50% to “personal” and 50% to “work"
    Question:  What would be the best database design approach to be able to breakout a bank transaction into smaller items?  For example there may have been really two (2) items purchased and turn up in a single bank account.    I still want
    to maintain the correctness of imported bank transactions themselves.
    For example some ideas that come to mind:
    a) add new detailed transactions to BANK_TRANSACTIONS for the detail, with a new column “REPLACED” so the the original bank transaction is there but can be marked as “replaced” so it doesn’t get used in queries/reports.  Then another RELATIONS table to
    relate the new detailed record to the parent original bank transactions.   Not sure if this would be considered good design or not
    b) have a separate table for BUSINESS_TRANSACTIONS so the detailed transaction go here.  But then 95% of the items in the BANK_TRANSACTIONS would just need to be duplicated in the BUSINESS_TRANSACTION table??
    Other ideas???
    In terms of usage/output would like have the concept of being able to show:
    a) maintain valid true bank transactions that are valid, as it is from there you can see your overall bank balance (across multiple accounts) across time,
    b) in terms of reporting for expense categories / taxable items etc need the detailed BUSINESS_TRANSACTION so to speak...

    Personally I would create a transaction header table that would hold the date and total amount of the transaction and any other header data and a detail table for the detail.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Ending a global transaction into WB

    Hi,
    today when I tried ton connect to my OWB project through the client, I get the following error:
    PRS-00322:internal error, started new global transaction without ending existing global transaction.
    I suppose there would be an "appended" global transaction into a still open procedure/session. I tried to kill all open sessions from the enterprie manager, but the error still exists.
    Does anyone has any suggestions about this, or knows how to solve it?
    Best regards,
    Alessandro

    have u tried this
    alter system session kill immediate""..
    else
    login as sys and check status of OWB design user...see if that is locked
    or at last
    if possible reboot the database server

  • After installing Firefox 4.0, I cannot download bank transactions into Quicken 2009.

    After installing Firefox 4.0, when I download bank transactions into Quicken 2009, it tries to open a new file rather than go into the file that is already open and from which it accessed Firefox in the first place.

    Such files that are passed to external programs are usually downloaded to the system temp folder (%TEMP% or %TMP%).
    You may need to check your Anti-virus software if this isn't working properly.
    *http://kb.mozillazine.org/Unable_to_save_or_download_files
    *https://support.mozilla.org/kb/Unable+to+download+or+save+files

  • How i can call transaction into conteiner

    hi,
    i hope you can help me,
    i want call one transaction into the conteiner.
    i try everyting but dont working
    REPORT Z_IGOR_TESTE2.
    DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    CLASS create_report DEFINITION
    CLASS create_report DEFINITION INHERITING FROM cl_gui_alv_grid.
    PUBLIC SECTION.
    METHODS:
    call_transactio.
    ENDCLASS. "create_report DEFINITION
    CLASS create_report IMPLEMENTATION
    CLASS create_report IMPLEMENTATION .
    METHOD call_transactio.
    call transaction 'SM30'.
    ENDMETHOD. "
    ENDCLASS. "create_report IMPLEMENTATION
    START-OF-SELECTION.
    call screen 100.
    *& Module STATUS_0100 OUTPUT
    text
    module STATUS_0100 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    data: initial type c,
    sm30 type string VALUE 'SM30',
    teste TYPE REF TO create_report.
    if initial NE 'X'.
    CREATE OBJECT G_CUSTOM_CONTAINER
    EXPORTING CONTAINER_NAME = 'CC'.
    CREATE OBJECT teste
    EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    *SET HANDLER: create_report2=>call_transaction FOR create_report.
    CALL METHOD teste->call_transactio.
    INITIAL = 'X'.
    endif.
    endmodule.

    The main issue is that you can have only one main dynpro (I don't talk about its possible subscreens) and any number of docking containers (outside the dynpro). But these docking containers must be created from the PBO of the main dynpro.
    If it's for SM30, I think it is possible only by a modification of the standard. Note that SM30 already handles docking containers, as you can see when you call a view cluster (SM34, docking container at the left of the dynpro).

  • How to combine 2 diff transactions into 1 transaction

    Hi All,
    I want to combine 2 diff transactions into single transaction so taht i can run these 2 at a time as a single transaction. Currently we have 2 diff transactions which we need to run one after anether. So we want to combine these 2 transactions as a single transaction. Is it possible, how we can do that. thanks in advance.
    Thanks,
    Vishal

    U can create a ABAP which calls the transaction one after another...and assign the new ABAP a transaction
    code using SE93.
    Basically the abap would like below.
    Report Ztrans.
    start-of-selection.
      call transaction ZT01.
      call transactin ZT02.
    Regards
    Anurag
    Message was edited by: Anurag Bankley

  • How GL groups AP transactions into Journals

    Hi,
    When I transfer AP transactions like validated invoices and payments how they get grouped into Journals in GL. Is it one Journal per invoice/payment or invoice lines can be distributed to multiple journals? What is the criteria transfer program or GL uses to group invoice lines or payment lines to Journals?
    When I checked Vision database, I found a invoice lines ( distributions ) were seen in multiple journals, I also noticed one Journal made of just one invoice distributions. I also seen one Journal has multiple invoices distributions? I am confused and wondering if there might be some setup's/options causing this haphazard grouping. Any help in understanding this process appreciated
    Thanks,

    Hello.
    Run the following query to see what Categories are coming from Payables.
    select distinct je_category
    from gl_je_headers
    where je_source = 'Payables'
    If you enter an invoice and validate it, when you post it to GL, the invoice header and all lines will be in the same journal. Later, if you make some modification on it (cancel and re-enter a distribution, for example) those modification will go into GL in a different Journal. The same thing happens with payments.
    Hope this helps.
    Octavio

  • Converting the Transaction  into PDF

    Hi All,
    How to convert the standard transaction PZ11 into PDF.
    Presently this PZ11 giving the output in script format.
    i need to convert it into PDF.
    it is very urgent...
    Pls do the needful..
    Regards

    hi
    good
    *& Report  ZRICHA_OTF_PDF
    report  zricha_otf_pdf
        message-id zz.
    CONSTANTS                                                           *
    constants : c_x(1)      type c value 'X',      " For constant value
                c_otf(3)    type c value 'OTF',    " For format
                c_u(1)      type c value 'U'.      " Mail Option
    VARIABLES                                                           *
    data : v_rqident  type tsp01-rqident,  " For Spool Number
           v_rqclient type tsp01-rqclient, " For Client
           v_rqo1name type tsp01-rqo1name, " For Object name
           v_spool    type tsp01-rqident,  " For Spool Number
           v_spool1   type tsp01-rqident.  " For Spool Number
    FLAGS                                                               *
    data : f_spool type c.
      INTERNAL TABLES                                                    *
    Internal table for sending mails
    data: it_pdf          like tline      occurs 10 with header line,
          it_xi_pdf       like tline      occurs 0  with header line,
          it_html         like solisti1   occurs 0  with header line,
          it_xi_temp      like bapiqcmime occurs 0  with header line,
          it_xi_mime(255) type c          occurs 0  with header line.
    For sending mail
    data: it_objpack like sopcklsti1 occurs 2 with header line.
    Internal table for Single List with Column Length 255
    data : it_objbin like solisti1 occurs 10 with header line.
    Internal table for Single List with Column Length 255
    data : it_objtxt like solisti1 occurs 10 with header line.
    Internal table for Structure of the API Recipient List
    data : it_reclist like somlreci1 occurs 5 with header line.
    Structure of the API Recipient List
    data: x_doc_chng like sodocchgi1.
    Internal table for storing the variants
    data : begin of it_variant1 occurs 0,
            variant like varid-variant,
           end   of it_variant1.
    Internal table to store variants for the programs
    data: it_variant2 like it_variant1 occurs 0 with header line.
    Internal table for storing the selected values
    data it_return type ddshretval occurs 0 with header line.
    Internal table for storing the mail-ids
    data : begin of it_mailid occurs 0,
            kokrs like csks-kokrs,
            kostl like csks-kostl,
            datbi like csks-datbi,
            telx1 like csks-telx1,
           end   of it_mailid.
    Internal table for storing the mail-ids
    data : it_mailid1 like it_mailid occurs 0 with header line.
      SELECTION SCREEN                                                   *
    data : v_char type char50.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_email for v_char  no intervals
                    lower case
                    no-display.
    select-options: s_email1 for v_char  no intervals
                    lower case
                    no-display.
    selection-screen end of block b1.
    selection-screen begin of block a1 with frame title text-028.
    selection-screen begin of line.
    parameters : p_c1 as checkbox.
    selection-screen comment 3(66) text-026 for field p_c1.
    selection-screen end of line.
    parameters : p_set like tsp1d-papart matchcode object zh_tsp1d.
    selection-screen skip 1.
    parameters : p_vara1 type rs38m-selset.
    selection-screen end of block a1.
    selection-screen begin of block a2 with frame title text-029.
    selection-screen begin of line.
    parameters : p_c2 as checkbox.
    selection-screen comment 3(56) text-027 for field p_c1.
    selection-screen end of line.
    parameters : p_set1 like tsp1d-papart matchcode object zh_tsp1d.
    selection-screen skip 1.
    parameters : p_vara2 type rs38m-selset.
    selection-screen end of block a2.
    AT SELECTION SCREEN ON VALUE REQUEST
    at selection-screen on value-request for p_vara1.
    For fetching the variants available for the program
      perform fetch_variants.
    at selection-screen on value-request for p_vara2.
    For fetching the variants available for the program
      perform fetch_variants1.
    AT SELECTION SCREEN
    at selection-screen.
    For Validation
      perform validation.
    START OF SELECTION                                                  *
    start-of-selection.
    To get the output data and mail
      perform fetch_data.
    END OF SELECTION                                                    *
    end-of-selection.
      if f_spool = c_x.
        message e000 with 'Spool Not Generated'(060).
      endif.
    *&      Form  fetch_data
          To get the output data and mail
    form fetch_data .
    To send the output to spool
      perform generate_spool.
    endform.                    " fetch_data
    *&      Form  generate_spool
          To send the output to spool
    form generate_spool .
      data: l_params like pri_params,
            l_days(1)  type n value 2,
            l_count(3) type n value 1,
            l_valid    type c,
            l_valid1   type c,
            l_params1  like pri_params.
      data: l_device type usr01-spld.
    *Get the printer name for the user
      select single spld into l_device from usr01 where bname = sy-uname.
      if l_device is initial.
        l_device = 'LOCL'.
      endif.
    For report-1
      if p_c1 = 'X'.
    Setting the print parameters
        call function 'GET_PRINT_PARAMETERS'
          exporting
            destination    = l_device
            copies         = l_count
            list_name      = sy-uname
            list_text      = 'SUBMIT ... TO SAP-SPOOL'(008)
            release        = c_x
            new_list_id    = c_x
            expiration     = l_days
           LINE_SIZE      = 255
           LINE_COUNT     = 65
            layout         = p_set
            sap_cover_page = space
            cover_page     = space
            receiver       = 'SAP*'(010)
            department     = 'System'(011)
            no_dialog      = c_x
          importing
            out_parameters = l_params
            valid          = l_valid.
        if l_valid <> space.
          clear v_spool.
    Fetch the spool number b4 submit
          perform fetch_recent_spool using v_spool.
    Submitting the program to spool
          submit rkaep000 to sap-spool
            using selection-set p_vara1
            spool parameters l_params
            without spool dynpro
            and return.
          clear v_spool1.
    Fetch the spool number after submit
          perform fetch_recent_spool using v_spool1.
          if v_spool = v_spool1.
            f_spool = c_x.
            if p_c2 is initial.
              stop.
            endif.
          else.
    Checking the format ( ABAP/OTF)
            perform format_check tables s_email.
          endif.
        else.
          message e000 with 'Problem in print settings'(003).
          stop.
        endif.
      endif.
    For Report-2
      if p_c2 = 'X'.
    Setting the print parameters
        call function 'GET_PRINT_PARAMETERS'
          exporting
            destination    = l_device
            copies         = l_count
            list_name      = sy-uname
            list_text      = 'SUBMIT ... TO SAP-SPOOL'(008)
            release        = c_x
            new_list_id    = c_x
            expiration     = l_days
           LINE_SIZE      = 200
           LINE_COUNT     = 65
            layout         = p_set1
            sap_cover_page = space
            cover_page     = space
            receiver       = 'SAP*'(010)
            department     = 'System'(011)
            no_dialog      = c_x
          importing
            out_parameters = l_params1
            valid          = l_valid1.
        if l_valid1 <> space.
          clear v_spool.
    Fetch the spool number b4 submit
          perform fetch_recent_spool using v_spool.
    Submitting the program to spool
          submit gp3diehxy88snfj0391v7kf9ek7050 to sap-spool
            using selection-set p_vara2
            spool parameters l_params1
            without spool dynpro
            and return.
          clear v_spool1.
    Fetch the spool number after submit
          perform fetch_recent_spool using v_spool1.
          if v_spool = v_spool1.
            message e000 with 'Spool Not Generated'(060).
            stop.
          endif.
    Checking the format ( ABAP/OTF)
          perform format_check tables s_email1.
        else.
          message e000 with 'Problem in print settings'(003).
          stop.
        endif.
      endif.
    endform.                    " generate_spool
    *&      Form  fetch_recent_spool
          Fetch the recent spool number generated
    form fetch_recent_spool using p_v_spool type tsp01-rqident .
      data:  l_user like tsp01-rq2name.
      clear : v_rqident,
              v_rqclient,
              v_rqo1name.
      l_user = sy-uname.
    Get latest Spool No
      select single rqident
                    rqclient
                    rqo1name
             into (v_rqident , v_rqclient , v_rqo1name)
        from tsp01
       where rqcretime =   ( select max( rqcretime )
                                    from tsp01
                                   where rq2name eq l_user
                                     and rqfinal eq '.' ).
      if sy-subrc = 0 .
        p_v_spool = v_rqident.
      endif.
    endform.                    " fetch_recent_spool
    *&      Form  format_check
          Checking the format ( ABAP/OTF)
    form format_check tables p_s_email structure s_email.
      data : l_objtype    like rststype-type.
      call function 'RSTS_GET_ATTRIBUTES'
        exporting
          authority     = 'SP01'(019)
          client        = v_rqclient
          name          = v_rqo1name
          part          = 1
        importing
          objtype       = l_objtype
        exceptions
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 4.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      if l_objtype(3) = c_otf.
    Convert OTF Spool to PDF
        perform convert_otf2pdf tables p_s_email.
      else.
    Convert ABAP Spool to PDF
        perform convert_abap2pdf tables p_s_email.
      endif.
    endform.                    " format_check
    *&      Form  convert_otf2pdf
          Convert OTF Spool to PDF
    form convert_otf2pdf tables p_p_s_email structure s_email .
      clear   it_pdf.
      refresh it_pdf.
      data : l_bytecount  type i.
    Fn. to get the PDF format
      call function 'CONVERT_OTFSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = v_rqident
          no_dialog                = 'X'
        importing
          pdf_bytecount            = l_bytecount
        tables
          pdf                      = it_pdf
        exceptions
          err_no_otf_spooljob      = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_dstdevice        = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11.
      if sy-subrc = 0.
    For page format
        perform page_format tables p_p_s_email.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " convert_otf2pdf
    *&      Form  convert_abap2pdf
           Convert ABAP Spool to PDF
    form convert_abap2pdf tables p_p_s_email structure s_email.
      clear   it_pdf.
      refresh it_pdf.
      data : l_bytecount  type i.
    Fn. to convert to PDF format
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = v_rqident
          no_dialog                = 'X'
        importing
          pdf_bytecount            = l_bytecount
        tables
          pdf                      = it_pdf
        exceptions
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11.
      if sy-subrc = 0.
    For page formatting
        perform page_format tables p_p_s_email.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " convert_abap2pdf
    *&      Form  send_mail
          For sending mail
    form send_mail tables mail structure s_email .
    Structures and internal tables for the send data
      data: objpack like sopcklsti1 occurs 2  with header line,
            objhead like solisti1   occurs 1  with header line,
            objbin  like solisti1   occurs 0  with header line,
            objtxt  like solisti1   occurs 10 with header line,
            reclist like somlreci1  occurs 5  with header line.
      data: doc_chng like sodocchgi1,
            tab_lines like sy-tabix.
    Data for the status output after sending
      data: sent_to_all like sonv-flag.
      clear: it_reclist, it_reclist[],
             it_objtxt , it_objtxt[],
             it_objpack, it_objpack[],
             it_objbin , it_objbin[],x_doc_chng.
      loop at it_html.
        objbin-line = it_html-line.
        append objbin.
        clear objbin.
      endloop.
    Create the document which is to be sent
      doc_chng-obj_name  = 'List'(012).
      doc_chng-obj_descr = 'Mail'(013).
    Heading
      objtxt-line = 'Mail with pdf attachment'(014).
      append objtxt.
      clear objtxt.
    Size
      describe table objtxt lines tab_lines.
      read table objtxt index tab_lines.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
    Fill the fields of the packing_list for the main document:
      clear objpack-transf_bin.
    The document needs no header (head_num = 0)
      objpack-head_start = 1.
      objpack-head_num = 0.
    Body
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = 'RAW'(015).
      append objpack.
    Create the attachment (the list itself)
      describe table objbin lines tab_lines.
    Fill the fields of the packing_list for the attachment:
      objpack-transf_bin = 'X'.
    Header
      objpack-head_start = 1.
      objpack-head_num = 0.
    Body
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = 'PDF'(016).
      objpack-obj_name = 'Attachment'(017).
      objpack-obj_descr = 'Mail with pdf Attachment'(018).
      objpack-doc_size = tab_lines * 255.
      append objpack.
    *-Fill the mail recipient list
      loop at mail.
        reclist-receiver = mail-low.
        reclist-rec_type = c_u.
        append reclist.
        clear: reclist,
               mail.
      endloop.
    *-Send the document by calling the SAPoffice API1 module for sending
    *-documents with attachments
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        exporting
          document_data              = doc_chng
          put_in_outbox              = c_x
          commit_work                = c_x
        importing
          sent_to_all                = sent_to_all
        tables
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = objbin
          contents_txt               = objtxt
          receivers                  = reclist
        exceptions
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          others                     = 99.
      case sy-subrc .
        when 0.
          message i000 with 'Mail has been sent successfully'(006).
        when others.
          message e000 with 'Problem in sending the mail'(023).
      endcase.
    endform.                    " send_mail
    *&      Form  page_format
           For page foramtting
    form page_format tables email structure s_email .
      data : l_lines       type i,
             l_temp(500)   type c,
             l_offset      type p,
             l_lineslen(2) type p,
             l_mimelen(2)  type p,
             l_tabix       like sy-tabix.
      clear : it_xi_pdf,
              it_xi_temp.
      refresh : it_xi_pdf,
                it_xi_temp.
      it_xi_pdf[] = it_pdf[].
    Reformat the line to 255 characters wide (code from SAP)
      clear: l_temp, l_offset, it_xi_temp.
      describe table it_xi_pdf   lines  l_lines.
      describe field it_xi_pdf   length l_lineslen in character mode.
      describe field it_xi_temp  length l_mimelen in character mode.
      loop at it_xi_pdf.
        l_tabix = sy-tabix.
        move it_xi_pdf to l_temp+l_offset.
        if l_tabix = l_lines.
          l_lineslen = strlen( it_xi_pdf ).
        endif.
        l_offset = l_offset + l_lineslen.
        if l_offset ge l_mimelen.
          clear it_xi_temp.
          it_xi_temp = l_temp(l_mimelen).
          append it_xi_temp.
          shift l_temp by l_mimelen places.
          l_offset = l_offset - l_mimelen.
        endif.
        if l_tabix = l_lines.
          if l_offset gt 0.
            clear it_xi_temp.
            it_xi_temp = l_temp(l_offset).
            append it_xi_temp.
          endif.
        endif.
      endloop.
      clear : it_xi_mime,
              it_xi_mime[].
      loop at it_xi_temp.
        it_xi_mime(255) = it_xi_temp-line.
        append it_xi_mime.
        clear  it_xi_mime.
      endloop.
    Final Data
      clear : it_html,
              it_html[].
      it_html[] = it_xi_mime[].
    For sending mail
      perform send_mail tables email.
    endform.                    " page_format
    *&      Form  fetch_variants
          For fetching the variants available for the program
    form fetch_variants .
      data : l_program like rs38m-programm value 'RKAEP000',
             l_vara1 type dfies-fieldname value 'P_VARA1'.
      clear : it_variant1,
              it_variant1[].
    Get variants
      perform get_variants tables it_variant1
                           using l_program.
    F4 Help
      if not it_variant1[] is initial.
        perform get_f4_help tables it_variant1
                             using l_vara1
                            changing p_vara1.
      else.
        message e000 with 'No variants available for report1'(054).
      endif.
    endform.                    " fetch_variants
    *&      Form  validation
          For Validation
    form validation .
      data : l_pro1 like rs38m-programm value 'RKAEP000',
             l_pro2 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
             l_c1,
             l_c2.
    If both check-box are unchecked
      if p_c1 is initial
    and p_c2 is initial.
        message e000 with 'Check any one check-box'(049).
      endif.
    If checked without varaint
      if not p_c1 is initial and p_vara1 is initial.
        message e000 with 'Please give any one of the variant for report1'(055).
      endif.
    If checked without varaint
      if not p_c2 is initial and p_vara2 is initial.
        message e000 with 'Please give any one of the variant for report2'(061).
      endif.
    Reading the variant and fetching the mail-ids
      if p_c1 = c_x.
        l_c1 = '1'.
        clear : s_email,
                s_email[].
        perform read_variants tables it_mailid
                                     s_email
                               using p_vara1
                                     l_pro1
                                     l_c1.
        if s_email[] is initial.
          message e000 with 'No Id available for given Cost report1'(066).
        else.
          sort s_email by low.
          delete adjacent duplicates from s_email comparing low.
        endif.
      endif.
    Reading the variant and fetching the mail-ids
      if p_c2 = c_x.
        clear : s_email1,
                s_email1[].
        l_c2 = '2'.
        perform read_variants tables it_mailid1
                                     s_email1
                               using p_vara2
                                     l_pro2
                                     l_c2.
        if s_email1[] is initial.
          message e000 with 'No Id available for given Cost report2'(067).
        else.
          sort s_email1 by low.
          delete adjacent duplicates from s_email1 comparing low.
        endif.
      endif.
    endform.                    " validation
    *&      Form  GET_VARIANTS
          Fetching Variants
    form get_variants  tables   p_it_variant structure it_variant1
                       using    p_v_program  type rs38m-programm.
      select variant
             from varid
             into table p_it_variant
             where report = p_v_program.
    endform.                    " GET_VARIANTS
    *&      Form  GET_F4_HELP
          text
    form get_f4_help  tables   p_it_variant1 structure it_variant1
                       using   p_l_vara1 like dfies-fieldname
                      changing p_p_vara like p_vara1.
    Fn. for Pop-Up
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = p_l_vara1
          value_org       = 'S'
          display         = ' '
        tables
          value_tab       = p_it_variant1
          return_tab      = it_return
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
      if sy-subrc = 0.
        p_p_vara = it_return-fieldval.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " GET_F4_HELP
    *&      Form  FETCH_VARIANTS1
          text
    form fetch_variants1 .
      data : v_program1 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
             l_vara2  type dfies-fieldname value 'P_VARA2'.
      clear : it_variant2,
              it_variant2[].
    Get Variants
      perform get_variants tables it_variant2
                           using v_program1.
    F4 Help
      if not it_variant2[] is initial.
        perform get_f4_help tables it_variant2
                            using  l_vara2
                          changing p_vara2.
      else.
        message e000 with 'No variants available for report2'(050).
      endif.
    endform.                    " FETCH_VARIANTS1
    *&      Form  read_variants
           Reading the variant and fetching the mail-ids
    form read_variants tables p_it_mailid structure it_mailid
                              p_s_email   structure s_email
                       using  p_p_vara1   like p_vara1
                              p_l_pro1    like rs38m-programm
                              p_l_c1      type c.
      data : l_temp(44),
             it_valutab like rsparams occurs 0 with header line.
      ranges : r_cocen for csks-kostl.
    Function Module to get the variant contents
      call function 'RS_VARIANT_CONTENTS'
        exporting
          report               = p_l_pro1
          variant              = p_p_vara1
        tables
          valutab              = it_valutab
        exceptions
          variant_non_existent = 1
          variant_obsolete     = 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.
      clear : r_cocen,
              r_cocen[].
      loop at it_valutab where selname = 'KOSTL'
                            or selname = '_C-CCTR'.
    Getting the range of cost centers
        if it_valutab-option = 'BT'.
          r_cocen-low    = it_valutab-low.
    For Conversion Routine
          perform conversion using r_cocen-low.
          r_cocen-high   = it_valutab-high.
    For Conversion Routine
          perform conversion using r_cocen-high.
          r_cocen-option = 'BT'.
          r_cocen-sign   = 'I'.
          append r_cocen.
          clear  r_cocen.
        endif.
    Getting the single cost centers
        if it_valutab-option = 'EQ'.
          r_cocen-low    = it_valutab-low.
    For Conversion Routine
          perform conversion using r_cocen-low.
          r_cocen-option = 'EQ'.
          r_cocen-sign   = 'I'.
          append r_cocen.
          clear  r_cocen.
        endif.
      endloop.
    If no cost centers
      if not r_cocen[] is initial.
        select kokrs
               kostl
               datbi
               telx1
          from csks
               into table p_it_mailid
         where kostl in r_cocen.
        if p_it_mailid[] is initial.
          if p_l_c1 = '1'.
            message e000 with 'No IDs available for report1'(059).
          elseif p_l_c1 = '2'.
            message e000 with 'No IDs available for report2'(062).
          endif.
        endif.
    Deleting the blank entries
        delete p_it_mailid where telx1 = space.
        clear l_temp.
        read table p_it_mailid index 1.
        l_temp = p_it_mailid-telx1.
        data : l_check.
        loop at p_it_mailid where telx1 <> l_temp.
          l_check = c_x.
        endloop.
    For checking the unique ids
        if l_check = c_x.
          if p_l_c1 = '1'.
            message e000 with 'No unique mail-ids for  report1'(058).
          elseif p_l_c1 = '2'.
            message e000 with 'No unique mail-ids for  report2'(065).
          endif.
        endif.
    Populating the IDs for the cost centers
        loop at p_it_mailid.
          set locale language sy-langu.
          translate p_it_mailid-telx1 to lower case.
          set locale language space .
          concatenate p_it_mailid-telx1 '@allergan.com' into l_temp.
          p_s_email-low = l_temp.
          p_s_email-sign = 'I'.
          p_s_email-option = 'EQ'.
          append p_s_email.
          clear  p_s_email.
        endloop.
      else.
        if p_l_c1 = '1'.
          message e000 with 'No Cost Center Available for report1'(057).
        elseif p_l_c1 = '2'.
          message e000 with 'No Cost Center Available for report2'(063).
        endif.
      endif.
    endform.                    " read_variants
    *&      Form  CONVERSION
          For Conversion Routine
    form conversion  using    p_it_valutab_low type c.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
        exporting
          input  = p_it_valutab_low
        importing
          output = p_it_valutab_low.
    endform.                    " CONVERSION
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    thanks
    mrutyun^

  • How to call standard CRM transactions into Webdynpro component

    Hi,
    i have a requirement where i need to call the the standard CRM transaction like <i>activity worklist</i> and <i>activity creation</i> into the webdynpro component. Please let me know how to do it, would appreciate it, if provided with a sample code.
    Thanks,
    Suri

    Hi Suri,
    You could use suspend/resume mechanism to jump to the ITS version of these transactions (in case they are ITS-enabled). Starting the SAPGUI from within the browser environment, transferring data/starting a transaction and then returning to the browser is not possible.
    Best regards,
    Thomas

  • Generating a CRM Custom Transaction into a BSP pages

    Hi everybody,
    sorry I have posted in web as general forum, probably this is the exact forum to post my question.
    In our CRM we have developed a custom transaction.
    Now, we would like to view the transaction through a BSP page and after we would like to link the BSP page into our Enterprise Portal.
    Are there any program in CRM on line to build a BSP page starting from a Custom Transaction??
    Can you suggest me any tips or any documentation to do this???
    Thank's a lot.

    Hi Antonio,
    what's about the way I've described in my Weblog <a href="/people/gregor.wolf3/blog/2005/05/27/use-crm-pcui-html-viewer-to-call-a-custom-url CRM PCUI HTML viewer to call a custom URL</a>?
    Regards
    Gregor

  • Combine Multiple SQL's of Same transaction into single SQL Transaction

    Hi All,
    I have a requirement where I have multiple changes happen to Same row which need to combined into one SQL
    For example
    Extract
    INSERT Row1
    Update Row1
    Update Row1
    Update Row1
    Commit
    On Replicat
    Insert Row1
    Update Row1
    Commit
    Is it possible to combine these 3 updates into 1 Update?
    Thanks,
    Vijay

    Hi Mackbell,
    We are dealing with cross company replication and we have multiple scenarios where client should not know what are the additional columns we do have . We don't want to have definition files at target, client can add additional columns to their table and we don't care about those. Similarly we don't want to send multiple updates to client, when I update a column which I don't that transaction should not go to client. If I am able to combine 3 updates to one on three different columns on single commit we can send 1 update instead of 3, this will also be layer of security for us. they can see trail files what kind of updates we do and over the network I can minimize number of transactions
    Thanks,
    Vijay

Maybe you are looking for

  • Can't open a document linked in a PDF. "This document tries to establish a connection". What can I do?

    When I try to open open a document which is linked in a PDF(I opened the PDF with Adobe Reader) there comes a safety warning: This document tries to establish a connection: file://(fileserver) Is this Website confidential, click on "allow". Is the we

  • No payload in message monitoring of PI7.3

    Hi experts, i am doing webservice -PI-webservice synchronous scenario.i am testing thru WS navigator.i am getting response xml also corretly.but problem is message monitoring.i am unable to see payload for both sender and reciever .it is giving no pa

  • How to reference dynamically :new value in a trigger

    Hi, I have a trigger in which i have to check all fields of a table that have many fields, so i retrieve table fields from all_tab_columns and would like to check :new value but do not know how to do that. Does someone have an idea? Thanks.

  • Check the Payment Method

    Hi Fi Gurus, Please inform me if there is any way to find the mode of payment in any payment document. e.g., a document is posted.......what is the mode of payment in that document..... Regards, Devang Edited by: Devang_Sangani on Mar 10, 2010 3:45 P

  • Calling webhelp topic from command line

    Hi I've searched the list, but was unable to find any information about this. How do you call a webhelp topic from the command line? What syntax would I use? Thank you Nadine