Help with the function module

Hi Expert,
I need help witht the functionmodule i just need to write a FM which has to read all the layouts Input values and multiply a percentage to create a new amounts. so is that i need to have both functionmdule and initializer and it will great if you can explain with some ABAP programs. so that i can follow up.

See this FM : UPF_QUOTA_PLANNING
You can code accordingly; init is optional; you dont init FM.
Ravi Thothadri

Similar Messages

  • Some issue with the Function Module u0093'SKWF_FIND_BY_QUERY' in a BW ECC6.0

    Hi All,
    Need some urgent help..
    Iam facing some issue with the Function Module “'SKWF_FIND_BY_QUERY' in a BW ECC6.0 system.
    As shown below, in the function module, the Table “IT_PROPERTIES_RESULT” gets populated with some values based on inputs like IT_CLASSES, IT_QUERY, and ‘L’.
    This updation of “IT_PROPERTIES_RESULT” table is happening for some of the services sent through IT_QUERY and is not getting populated for some.
      call function 'SKWF_FIND_BY_QUERY
    exporting
      CONNECTION_SPACE         =
        OBJ_TYPE                 = 'L'
      PTYPE                    =
      X_STRICT                 =
    IMPORTING
      ERROR                    =
         tables
         CLASSES                  = IT_CLASSES
         QUERIES                  = IT_QUERY
         RESULT_OBJECTS           = IT_LOIO
      PROPERTIES_REQUEST       = PROPERTIES_RESULT        = IT_PROPERTIES_RESULT.
    The values are as follows:-
    Values getting populated in IT_CLASSES – BW_LO_TRAN               Values getting populated in IT_QUERY – 1) BW_QUERY, 2) /BIC/ZSERVICE
    I would like to know whether any Standard Customizing BW transaction is present that is maintaining “IT_PROPERTIES_RESULT” table properties  and fetching through this Function Module.
    Also, suggest how this issue can be resolved
    Thanks & Regards,
    Shailesh nagar

    Thanks Suhas. That definitely helped.
    Also the following links helped.
    http://help.sap.com/saphelp_nw70/helpdata/EN/86/1c8c3e94243446e10000000a114084/frameset.htm
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Cheers,
    Preethi

  • Problem with the function module SO_DOCUMENT_SEND_API1

    Hi Friends,
    I am facing the problem wiht the function module SO_DOCUMENT_SEND_API1,
    My actull requirement is : - i need to send the sap data to my externa mail id (Like as XYZ@) with out the any attachment , So i have implemented the code with the function module SO_DOCUMENT_SEND_API1.
    The mail has successfully sent the sap inbox (SOST) but the mail are not reached to the external mail ID'S( XYZ@GMAIL)
    i Have maintained my code lines same as below.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data = wa_doc_data
          put_in_outbox = ca_x
          commit_work   = ca_x
        TABLES
          packing_list  = tb_packing_list
          contents_txt  = tb_mailbody
          receivers     = tb_receiver.
    Can you please tell me soultion ,
    Thanks
    charan.

    Hi charan,
                      If u r able to see the mail in sost, then i think ur code has worked fine. if the mail is not going to outside domains from sost u need to do some configurations for that, u can find lots of configuration docs regarding mail setup in sap.
    once try to pass below parameter also.
    t_receivers1-rec_type = 'U'.
    For configuring mail setup u need to sit with ur basis guy.
    Moderator message: please do not use SMS speak.
    Edited by: Thomas Zloch on Nov 23, 2010 5:51 PM

  • Help with a Function-module

    Hi again forum:
       I have a program and i need to pass basic functionality to a set of funtion module.
       I have a description of a internal table in the program, that i need to use in the function-module
    Example:
         PROGRAM
    " In the top of the program i declared.
    "This the actual version
            TYPES: BEGIN OF t1
                         END OF t1.
            DATA:  it_some TYPE STANDARD TABLE of t1 with header line.
            SELECT *
            FROM
            INTO TABLE it_some.
          FUNCTION MODULE
    Now in the new version i need to declare an output paramter of type t1 in the exports parameters of the function ZMY_FUNCTION, and t1 is an internal_table, what can i do forum ?..
    The thing is that how can i declare an export parameter that is not know?
    please help
    Thanks
    Joshua

    hi,
    we can pass internal table to FM by using CHANGING or TABLE options.
    regards,
    AshokReddy.

  • Help with bapi / Function module

    Can anybody please provide me a sample source code or example on how to use the function module BAPI_BILLINGDOC_CREATEMULTIPLE for creating billing document?
    Thanks in advance,
    Krishen

    hi
    hope the following helps u to know what is to be passsed.
    1.  Required entries     :
          BILLING_DATA_IN-SALESORG
          BILLING_DATA_IN-DISTR_CHAN
          BILLING_DATA_IN-DIVISION
          BILLING_DATA_IN-DOC_TYPE
          BILLING_DATA_IN-ORDBILLTYP
          BILLING_DATA_IN-SOLD_TO
          BILLING_DATA_IN-ITEM_CATEG
          BILLING_DATA_IN-REQ_QTY
          BILLING_DATA_IN-SALES_UNIT
          BILLING_DATA_IN-CURRENCY
          If a material is billed for which a material master needs to be
          determined (BILLING_DATA_IN-NO_MATMAST = ' '), you must make the
          following entries :
          BILLING_DATA_IN-PLANT
          BILLING_DATA_IN-MATERIAL
          If, on the other hand, a material is billed for which no material
          master is to be determined (BILLING_DATA_IN_NO_MATMAST = 'X'), you
          must make the following entries :
          BILLING_DATA_IN-COUNTRY
          BILLING_DATA_IN-MATERIAL
          BILLING_DATA_IN-TAXCL_1MAT
    2.  COMMIT control :
          In the update run (TESTRUN = ' ')  the update is carried out by
        COMMIT
          WORK as part of the method available.

  • Please help regarding the function module 'MESSAGE_TEXT_BUILD'

    hii i am a new employee.
    can anyone please explain wat the following code is doing
    IF sy-subrc = 0.
    l_mstring = t100-text.
    IF l_mstring CS '&1'.
    REPLACE '&1' WITH wa_messtab-msgv1 INTO l_mstring.
    REPLACE '&2' WITH wa_messtab-msgv2 INTO l_mstring.
    REPLACE '&3' WITH wa_messtab-msgv3 INTO l_mstring.
    REPLACE '&4' WITH wa_messtab-msgv4 INTO l_mstring.
    ELSE.
    REPLACE '&' WITH wa_messtab-msgv1 INTO l_mstring.
    REPLACE '&' WITH wa_messtab-msgv2 INTO l_mstring.
    REPLACE '&' WITH wa_messtab-msgv3 INTO l_mstring.
    REPLACE '&' WITH wa_messtab-msgv4 INTO l_mstring.
    ENDIF.
    CONDENSE l_mstring.
    i am supposed to use a function module for it
    i have got a function module.
    but i am not understanding wat fields shd i put in it
    the function module is
    CALL FUNCTION <b>'MESSAGE_TEXT_BUILD'</b>
    EXPORTING
    msgid =
    msgnr =
    MSGV1 = ' '
    MSGV2 = ' '
    MSGV3 = ' '
    MSGV4 = ' '
    IMPORTING
    MESSAGE_TEXT_OUTPUT =
    can anyone tell wat shd i put on msgid ,msgnr and other fields.
    [email protected]

    Hello,
    Guid for unique identification assigned list
    It think it will generate the one unique key in the program.
    DATA: con_log_guid   TYPE  guid_16.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        ev_guid_16 = con_log_guid.
    WRITE con_log_guid .
    Try this example it is generating a 16number id.

  • System_failure error with the function module HTTP_POST

    Hi Friends,
      While executing the function module "HTTP_POST" ,sometime we are getting the error "System_Failure" exception.
    Can anyone tell what could be the reason for this exception,any configurations need to be done on SAP???
    For this FM we are passing the RFC destination"SAPHTTPA" as one of the paratmeter and
    The two import paramters we are passing to this FM are
    URI : 
    http://10.74.40.31:8686/ArchiveBridge/?informaticaArchive&contRep=IA&sumFile=MYTA_SUMMARY_20090820063258.sum
    Destintion : SAPHTTPA
    Thanks all in advance.
    Regards
    Dharmaraju

    Hi,
    Check if any proxy is maitained in the client by going into transaction
    SICF-> Goto-> HTTP Client Proxy -> HTTP LOG TAB.
    If there is anything maintained under Host name and port, if yes you need to specify the IP address while calling FM HTTP_POST
    under PROXY as
    192.168.0.1:8080  where first part is IP address & 2nd part(8080) is port.
    Also test connection for SAPHTTPA under SM59 to see if its properly configured.
    Regards,
    Amit

  • Please help with 'Pricing' function module

    Hi!
    I am trying to use function module 'Pricing' but the table it_komv is still empty even after calling. I am basically trying to print some free of charge items on invoice sapscript and hence I am using 'Pricing' function in the print program. I am passing the below parameters. Please tell me whatelse I need to pass/not to pass.
      wa_komk-mandt = sy-mandt.
          wa_komk-kalsm = vbdkr-kalsm.
          wa_komk-kappl = 'V'.
          wa_komk-waerk = vbdkr-waerk.
         wa_komk-knumv = vbdkr-knumv.
          wa_komk-knuma = vbdkr-knuma.
          wa_komk-vbtyp = vbdkr-vbtyp.
          wa_komk-land1 = vbdkr-land1.
          wa_komk-vkorg = vbdkr-vkorg.
          wa_komk-vtweg = vbdkr-vtweg.
          wa_komk-spart = vbdkr-spart.
          wa_komk-prsdt = vbdkr-erdat.
          wa_komk-kurst = vbdkr-kurst.
          wa_komk-kurrf = vbdkr-kurrf.
          wa_komk-kurrf_dat = vbdkr-kurrf_dat.
          wa_komp-kposn = vbdpr-posnr.
          wa_komp-kursk = vbdpr-kursk.
          wa_komp-kursk_dat = vbdpr-kursk_dat.
          wa_komp-werks = vbdpr-werks.
          CALL FUNCTION 'PRICING'
            EXPORTING
            CALCULATION_TYPE        = 'A'
              comm_head_i             = wa_komk
              comm_item_i             = wa_komp
            PRELIMINARY             = ' '
            NO_CALCULATION          = ' '
         IMPORTING
             comm_head_e             = wa_komk
             comm_item_e             = wa_komp
          TABLES
              tkomv                   = it_komv
            SVBAP                   =
        CHANGING
            REBATE_DETERMINED       = ' '
    Thanks a lot!

    Hi,
    Check this example..
    tables: vbdkr.
    data: s_komk type KOMK.
    data: s_komp type komp.
    data: t_komv like KOMV occurs 0 with header line.
    data: t_komvd like komvd occurs 0 with header line.
    Input
    s_komk-mandt = sy-mandt.
    s_komk-knumv = vbdkr-knumv.
    CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
      EXPORTING
        comm_head_i       = s_komk
        comm_item_i       = s_komp
      tables
        tkomv             = t_komv
        tkomvd            = t_komvd
    You can check the program RVADIN01 for a sample..
    Hope this helps..
    Thanks,
    Naren

  • Need help for the Function Module 'PFL_GET_PARAMETER_INFO'

    Hi Experts,
    The FM 'PFL_GET_PARAMETER_INFO'  returns the value for Profile Parameters for a system .
    The inputs required for this FM are :
      1.   Parameter name  : ( eg . login/min_password_lng etc. )                   
      2 . Parameter Type
    I am not sure about what the value of Parameter Type should be .
    Its a mandatory field.
    I have tried to search but could not find anything.
    Can you please help me on this?
    Thanks in Advance,
    Harshit Rungta
    Edited by: harshit rungta on May 27, 2011 8:15 AM

    What exactly is the use-case for this?
    Many developers "c-call" the params and neglect this feature of the type - also whether it is static or dynamic. Some params are even dynamic as system profiles in one direction but static as instance parameters in the other direction when changing the value.
    As you cannot create your own system profile parameters, I do not see the use-case for why you are wanting to check it in advance, because the application APIs should do this.
    What you are possibly looking for is function module SUSR_GENERATE_PASSWORD in this case. It will respect "the rules" in the params.
    Do not use the legacy function RSEC_GENERATE_PASSWORD directly.
    Cheers,
    Julius

  • Error with the function module REUSE_ALV_GRID_DISPLAY

    Hi,
    While using the fucntion module REUSE_ALV_GRID_DISPLAY
    I am getting the below error.
    Message i407(0k) with l_template_om.
    message says 'Contact your system administrator. The following template is missing: sap_mm.123
    Kindly provide me the reason why this success message is displayed for this function module.
    Vijay

    at first its an information message sind its of type I and not of type S which would be success.
    this message is beeing displayed because that template is really missing, believe it when SAP talks to you.
    So talk to your basis guys.
    to come around this problem without talking to your basis guys, i´d propose to use CL_SALV_TABLE or CL_GUI_ALV_GRID to display an ALV.

  • Help regarding the Function Module GUID_CREATE

    Hi Experts,
    Can some one explain the functionality of GUID_CREATE function module.Thanks in advance.
    With regards,
    Srini...

    Hello,
    Guid for unique identification assigned list
    It think it will generate the one unique key in the program.
    DATA: con_log_guid   TYPE  guid_16.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        ev_guid_16 = con_log_guid.
    WRITE con_log_guid .
    Try this example it is generating a 16number id.

  • Please help with some function module

    Dear All,
    We are trying to get data for excise duties based eg. BED, ECS, SECESS in the PO printout. Can anyone please suggest any function module through which excise duty can be calculated. For condition types other than ED we are using function module CALCULATE_TAX_ITEM. Please help.
    Thanks and regards,
    Atanu

    Dear All,
    We are trying to get data for excise duties based eg. BED, ECS, SECESS in the PO printout. Can anyone please suggest any function module through which excise duty can be calculated. For condition types other than ED we are using function module CALCULATE_TAX_ITEM. Please help.
    Thanks and regards,
    Atanu

  • Help with the FM view_get_data

    Hello,
    i need some help with the function module 'view_get_data' ,when i try to execute the function only with the name of the view without conditions( the prameter DBA_SELLIST ), it returns me the table correctly, but when i'm trying to execute the function with conditions, it returns an empty table. Please tell me how to execute the function the conditions so it would work.
    Best regards,
    Udi.

    check first that any view is there for the table other wise the data will not be populated..
    pass the view name inot table DD25V.
    select * from DD25V where viewname = p_view .  " view name passing to fm 
    if sy-subrc = 0.
    CALL FUNCTION 'VIEW_GET_DATA'
      EXPORTING
         VALUE(VIEW_NAME)  =     "Pass table name
      TABLES
          DATA                        = pass internal table with above table name
    else.
    write : 'view does not exist'.
    endif.
    regards,
    Prabhudas

  • Question about the function module (RFC_READ_TABLE)

    Dear everyone
    Could I ask you a question about the function module (RFC_READ_TABLE)?
    I was asked if it's possible to create a report which compares the data between different SAP systems (both production systems).
    Now, the easiest way would be to use the function module (RFC_READ_TABLE) within a SAP infoset query (SQ01 type query).
    But I heard the rumor that using the function module (RFC_READ_TABLE) is not advisable due to the security reason.
    However, I am not exactly sure what sort of security problems this function module can possibly have...
    Would you help me on this?
    I also would like to know if using "remote enabled module" type function module can always overcome this possible security issue.
    Or, are there any points that I need to be careful about even when I use "remote enabled module" function module?
    Thank you very much in advance.
    Takashi

    Dear Fred-san
    Thank you very much for your support on this.
    But, may I double check about what you mentioned above?
    So, what you were mentioning was that if some user executes the query with
    the function module (RFC_READ_TABLE), under the following conditions, he can access to
    the HR data even when he does not have the authorizations for HR transactions?
    <Conditions>
    1. the user has the authorization for HR database tables themselves
    2. RFC_READ_TABLE is called to retrieve the data from HR database
    <example>
    Data: LF_HR_TABLE like  DD02L-TABNAME value 'PA0000'.
    CALL FUNCTION 'RFC_READ_TABLE'
       EXPORTING
        query_table                = LF_HR_TABLE
      TABLES
       OPTIONS                    =
       fields                     =
       data                       =    .
    But then, as long as we call this function module for a non-critical tables such as
    VBAP (sales order) or EKKO (purchase order) within our query, it wouldn't seem to be
    so security risk to use RFC_READ_TABLE...
    Besides, each query (infoset query) has got the concept of user groups, which limits
    the access to the queries within the user group.
    ※If someone does not belong to the user group, he cannot execute the queries within that
       user group, etc
    So, my feeling is that even infoset queries does have authorization concept...
    Would you give me your thought on this?
    I also thank you for your information for SCU0.
    That is an interesting transaction
    Kind regards,
    Takashi

  • Please help me out with the function code of print option in module pool

    please help me out with the function code of print option in module pool, along with CASE condition.
    regards,
    asif

    Hi
    you can use the Function module
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = 'LP01'                       "'Printer name
        list_name              = 'TEST'
        list_text              = 'SUBMIT ... TO SAP-SPOOL'
        immediately            = ' '
        line_size              = '2000'
        no_dialog              = 'X'             "pass space to Pop screen for Print option
      IMPORTING
        out_parameters         = wa_pri_params
        valid                  = w_valid.
    "next call below things
      NEW-PAGE PRINT ON NO DIALOG PARAMETERS wa_pri_params.
         "and try to Print the values inside the new-page
      NEW-PAGE PRINT OFF.
    Prabhudas

Maybe you are looking for