AVL in Function modul for WorkFlow

I am doing an ALV in FM for a WF and I have three possible action there.
VALID
REFUSE
CANCEL
I want to put a value in my FM export parameter called action and end the FM.
Then the WF use the parameter action to know which action have been chosen.
But when I do exit or leave screen I return to the ALV.
When I code leave program I terminate the FM without passing the value.
Do you have any solution for me ?
Thanks for help.
Bertrand
*&      Form  alv_user_command
Gestion commande écran choix des métiers
FORM alv_user_command  USING ucomm    LIKE sy-ucomm
                             selfield TYPE slis_selfield.
  CLEAR w_action.
  CASE sy-ucomm.
    WHEN '&VAL'.
      w_action = 1.
      exit.
    leave screen.
     leave program
    WHEN '&REF'.
      w_action = 2.
    WHEN '&BACK'.
      w_action = 0.
  ENDCASE.
ENDFORM.                    "alv_user_command

Hi,
you can try this..
*& Form alv_user_command
Gestion commande écran choix des métiers
FORM alv_user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CLEAR w_action.
CASE sy-ucomm.
WHEN '&VAL'.
w_action = 1.
selfield-exit = 'X'.
WHEN '&REF'.
w_action = 2.
WHEN '&BACK'.
w_action = 0.
ENDCASE.
ENDFORM. "alv_user_command
Now you can get what you want with selfield-exit = 'X'.
Regards
Vijay

Similar Messages

  • Type RAW not accepted in function module for workflow

    Hi,
    this is a crazy thing for me:
    I like to start a workflow from a report.
    Usually will use the function module SWU_START_WORKFLOW".
    Usually this is no problem.
    Here is my current problem:
    One of the elements I have to transfer to workflow is defined with
    ZELEMENT like SXMSMGUID.
    SXMSMGUID is from type RAW.
    This type is not supported in the container element transfer.
    Tried to transfer it as CHAR.
    ZELEMENT type c,
    ZELEMENT = SXMSPEMAS-MSGGUID.
    So put the RAW element into a char element.
    Error in function module:
    Program error: ASSIGN with length 0 in program "SAPLSWA8".
    Error analysis
        An ASSIGN statement in the program "SAPLSWA8" contained a field symbol with
        length 0. This is not possible.
        length 0.
        This is not possible.
    I need that element to be transferred to the workflow.
    But how to solve that problem?
    How to move the RAW element readable into a char element (This type usually is no problem in the FM)
    Any ideas are welcome!
    Best regards
    Dirk

    ya i know that ..But I wanted to create a simple one..moreover the problem is not with bdc....It is with the function module interface..
    Also I want to ask a question that I had to define all the parameters (in the function module ) by data declaration statements in the function group top include..
    If i dont do that say the first error is when i write loop at idoc_contrl ..idoc_contrl is not declared by a data statement..So IO had to write a data statement:
    Idoc_contrl type table of edidc..I have seen that in other function modules (idoc inbound processing)  no such data declaration is done..

  • Function Module For F-04

    Hi
    Is there any function module for F-04 transaction.
    Please help with answers.

    Hi,
    Check the following Exits
    SAPLF051                     Workflow for FI (pre-capture, release for payment)
    RFKORIEX                    Automatic correspondence
    RFEPOS00                   Line item display: Checking of selection conditions
    RFAVIS01                  Customer Exit for Changing Payment Advice Segment Text
    FEDI0001                    Function Exits for EDI in FI
    FARC0002                  Additional Checks for Archiving MM Vendor Master Data
    F180A001                  Balance Sheet Adjustment
    reward if useful
    regards,
    Anji

  • Function module - object - workflow(complicated to explain:))

    Hello,
    I have a problem.
    I created in se37 the function ZRR_ACTORS. I have as the import parameter PRNUMBER with type BAPIEBANC-PREQ_NO. As an export parameter i have RECIPIENT with type BAPIEBANC-REASON_BLOCKING( i have not found an appropriate type for the recipient that works in a function module for the object, so i used this..i do not think that is the problem).
    The code is:
    data:begin of gs_eban,
      menge type eban-menge,
      preis type eban-preis,
      end of gs_eban,
      gt_eban like table of gs_eban,
      gv_sum type i,
      gv_aux  type SWD_MRCPNT.
    select menge preis from eban into TABLE gt_eban where banfn = prnumber.
    loop at gt_eban into gs_eban.
      gv_sum = gv_sum + gs_eban-menge * gs_eban-preis.
      endloop.
    if gv_sum > 20.
        select single recipient from zteam_approvers into gv_aux where zuser = 'xxxx.
        else.
        select single recipient from zteam_approvers into gv_aux where zuser = 'yyyy'.
          endif.
    recipient = gv_aux.
    As you probably see, i am sending this function the purchase requisition number. In the function I am calculating the value of the purchase requisition. If the value is bigger then 20 i want the recipient to be the email adress of the user xxxx. Else the other email. zteam_approvers is a table with users and their emails.
    When i test this function everything is ok.
    I created subtype for object BUS2015(purchase requisition), called ZBUS2015. Here i created a method which uses the function ZRR_ACTORS. I released it and after that i selected in swo1 BUS2015 and delegated ZBUS2015. So now when i test object BUS2015, i can use method ZRR_ACTORS which contains the function module ZRR_ACTORS.
    If i test this object, the method ZRR_ACTORS works fine. I give the method the number of the purchase requisition and it returns me the user xxxx or yyyy.
    Now, i created a workflow. In this workflow i want to send an email to the user xxxx or yyyy. So i have to execute the function ZRR_ACTORS. I create an activity(zrr_activity) in the new workflow. In it, i create a new task(zrr_task) in the activity with object category BUS2105 and method ZRR_ACTORS. I am setting this method as a background method, because after the execution of the function i want to create a Send email step, with the recipient being the one of the emails.
    My problem is the binding. In the workflow container i set the PRNUMBER as an import parameter and the Recipient as an export parameter.
    In the binding of the step(zrr_activity) i set the following bindings:
    Workflow                           STEP
    &PRNUMBER&  ->  &PRNUMBER&
    &BUS2105&  ->  &_WI_OBJECT_ID&
    &RECIPIENT&  <-  &RECIPIENT
    If i click in the activity, in the task i created(zrr_task), in the object method i set the bindings:
    Task                                 Method
    &PRNUMBER&  ->  &PRNUMBER
    &RECIPIENT&  <-  &RECIPIENT&
    I run the workflow. Now i enter the PRNUMBER 0010000420, but it remains 10000420 (maybe this i because of the type PREQ_NO.) and execute.The task has the status In Process. I click on Workflow log, then on list with technical details, and then in the container, i see the Recipient is empty.
    So, i think the function did not work properly. What do you think?
    Thank you very much,
    Efren
    Edited by: Efren23 on May 30, 2011 7:31 PM

    Hi Efren,
    Go to transaction ST22 and check for any dump.
    The work item is in process, so there will be a dump in the system.
    The Function module parameters could be a problem.
    ST22 transaction will give you details about the dump.
    Thanks,
    Viji.

  • Functional module for automatic creation of pur requisition & pur order

    hello,
    what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
    please let me know as early as possible
    regards,
    rajesh kumar raju

    Hi,
             Please check with following.
    IDOC_INPUT_ACC_PURCHASE_REQUI
    IDOC_INPUT_ACC_PURCHASE_ORDER
    /ISDFPS/OR_PURCHASE_ORDER_CR
    BS01_PURCHASE_DOCUMENT_CREATE
    CO_MP_CREATE_PURCHASE_ORDER
    Thanks & Regards
    Sadhu Kishore

  • Function module for calculating planned and actual cost of production order

    Hi ,
    Do we have any standard function module for calculating planned and actual cost for production order?
    i need to implement this in a Z-report.
    Thanks
    Srini

    Hi,
    try below function module
    CRMCO_GET_PLAN_ACTUAL_COSTS
    CO_IH_GET_PLANNED_COSTS_TOTAL
    Regards,
    Sankaran

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends,
    Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
    which are recieved from XI Server ?
    I am working in SAP-ISU
    Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
    We have a Standard INBOUND FUNCTION MODULE
    IDOC_INPUT_ISU_MR_UPLOAD
    which Uploads the Meter Reading Results.
    I copied the Same function Module into ZIDOC_INPUT_
    and working on it.
    Can any one suggest me, whether i am going in correct way or not.
    In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
    BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
    My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
    Can I Use the Same BAPI
    BAPI_MTRREADDOC_UPLOAD
    to Update the below fields,
    EABL-SERNR
    EABL-ZWNUMMER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS
    EABL-ADATTATS
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Kindly Suggest me,
    Thanks in Advance,
    Ganesh

    Hello Ganesh
    I think you are going completely astray with you z-function module for IDoc processing.
    If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
    EABL-SERNR => BAPIEABLU-SERIALNO
    EABL-ZWNUMMER =>REGISTER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS => ACTUALMRTIME
    EABL-ADATTATS => ACTUALMRDATE
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
    Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
    - BAPI_TE_EABL
    - BAPI_TE_EOSB
    Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
    Regards
      Uwe

  • How to config Check Digits function module for Student Number Validation

    Hi SLCM Experts,
    In the SAP-SLCM, How to use check digits function module for validate student number.  Just only config it or need to customizing program.
    *Any idea to student number validation in SLCM?*
    Best Regards,
    Suvatchai K.

    Hi ,
    Can you expalin it further ?
    You configure the St. no in piq_matr . And set it  as external or internal no. range which suits your business .
    What is the validation you are looking for ?
    Regards
    Gajalakshmi

  • Function Module  for FB01 Vendor line items postings in 3.1 Version

    Hello all,
    Is there any Function Module  for FB01 Vendor line items postings in 3.1 Version. I do not want to go for BDC. Please suggest.
    Thanks,
    Subba

    Hi,
    search for function module ACCPOSTING* or get development class of transaction FB01 and goto SE80, enter development class - and search in function group's function module.
    Cheers.
    ...Reward if useful.

  • Function Modules for uploading the file

    Hi experts ,
                      I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
    Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
    Prompt replies will be rewarded.
    TIA
    Abhishek

    Hi Abhishek,
    How to use INSERT Statement..
    Check this Sample Program..
    TABLES:MARA.
    DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    ITAB-MATNR = '123ABCDA'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    ITAB-MATNR = '123ABCDB'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    LOOP AT ITAB.
    INSERT MARA FROM ITAB.
    MODIFY MARA .
    ENDLOOP.

  • Function modules for the following

    Hi,
    I want to know the function modules for the following purposes.
    1) Check whether a date is valid or not
    2) Calculate the no of days between two dates.
    Expecting an early response.
    Thanks n Regards,
    Amit

    Hi,
    PARAMETERS: p_list LIKE t009b-bumon AS LISTBOX
                         VISIBLE LENGTH 11 OBLIGATORY ,
                p_list1 LIKE t009b-bdatj OBLIGATORY.
    SELECTION-SCREEN POSITION POS_HIGH.
    PARAMETERS: p_list2 LIKE t009b-bumon AS LISTBOX
                          VISIBLE LENGTH 11 OBLIGATORY,
                p_list3 LIKE t009b-bdatj OBLIGATORY.
    Calling Function Module for calculating no of days between the
    selected period
        CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
             EXPORTING
                  par_month = p_list
                  par_year  = p_list1
             IMPORTING
                  par_days  = ws_n_days.
        CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
             EXPORTING
                  par_month = p_list2
                  par_year  = p_list3
             IMPORTING
                  par_days  = ws_n_days1.
    For Concatenating the month and year into the date format
        CONCATENATE  p_list1  p_list ws_i INTO ws_c_date1.
        CONCATENATE p_list3  p_list2 ws_n_days1 INTO ws_c_date2.
      date = ws_c_date1 - ws_c_date2.
    In the above sample code the selection screen has month and year as input.
    Also check this link
    http://www.sapdevelopment.co.uk/tips/date/datehome.htm
    Check FM
    <b>RP_CALC_DATE_IN_INTERVAL</b> Add/subtract years/months/days from a date
    <b>SD_DATETIME_DIFFERENCE</b> Give the difference in Days and Time for 2 dates
    <b>Also for checking valid date:</b>
    U can specify the date field as
    Select-options:  s_date like likp-date(similar to ur requirement)
    This itself ceck for the valid date no seperate validation needed.
    Thanks & Regards,
    Judith.

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

  • Function Module for open Purchase Order & Sales Order?

    Hi, commonly I read the data from tables and calculate the open quantity for sales order and purchase order, but I want to know, are there any standard function modules for getting the list of open "purchase order" and "sales order" respectively?
    Thanks and Regards.

    hi Ren,
    u can check all these bapi's related to salesorder
    BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
    BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
    BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    May be this FM can help you
    MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
    Regards,
    Naveen

  • Function module for GL account open items at a key date

    Is there a function module for "GL account open items at a key date" similar to following for customer and vendor accounts?
    BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date
    BAPI_AP_ACC_GETOPENITEMS Vendor account open items at a key date
    If not, please suggest any alternatives. I am looking to capture the output of FBL3N (GL account line item display) in a program.
    Thank you in advance.
    Prasanna Pujari

    hi,
    please go through the below link i think it will help u.
    http://sapfunctional.com/FI/GL/Balance.
    Regard
    Abhishek Tripathi

  • Function Module for outline agreement

    Dear Sir,
    I want to know the function module for contract/outline agreement from where I can fetch the details of release orders against the given contract.
    Regards
    Amit Agarwal

    Hi
    Go to SE37 enter the Outline agreement and press F4
    you can see the function module
    (or) Post the same message in  SAP ABAP forum
    G.Ganesh Kumar

Maybe you are looking for

  • Projectname.exe' does not contain a static 'Main' method suitable for an entry point .

    Hi, I'm developing a blog reader for windows 8 store app. It was perfectly worked before. But because of some miss behave my coding i get below error. No other errors there. Error    1    Program 'c:\Users\.........\Desktop\Blog_Reader\Blog_Reader\ob

  • Can we dynamically modify the Component Hierarchy?

    Is it possible to modify the component hierarchy in JSF when making an Ajax call to the server for information? I am interested in using Ajax with JSF to update the UI incrementally as needed. As an example, imagine a phone book which starts with a l

  • PO Value Limits

    Hi all, Does any of you have any documentation, information about PO limit values defined in the extended attributes of the PPOMA? How this functionality works in a standalone scenario? Thanks, Ana

  • AI CS3 - Save for Web & Devises image name problem

    Hi - For some reason when I doubleclick to name an image slice, hit Done to go back to the file, then go back to Save for Web & Devices, AI doesn't remember the names. I have to retype them (defaults back to User1 or whatever number). Anyone know how

  • Only one audio canal works

    Hello folks, I've had my iPhone 3G for over a year now, but now the first problem has occured. When have my headphones plugged in, there is only sound on the left of them. The same thing happens when I want to listen to music through the speakers. On