Whether to go for bdc or user exits???

hi,
I have a reqirement like given below how should i proceed plz help me out.
If pre-tax contribution percentage in field EEPCT from table P0169  is less than 6%, only first sequence of  customizing table V_74FF_C should run. It means, for employer contribution rule out of two sequences only one sequence shown  should run and stop, the rule variant should not process the next sequence shown.

So, readiing between the lines, you've been given some work to do and you have no idea where to start or how to do it and you want someone on here to explain it for you?
Why don't you go and sit down with your functional consultant and go through it with them - they should be able to explain what to do and where to do it.  You can then work with this and convert it to ABAP.

Similar Messages

  • ISSUE:BDC In user exit

    Hi all,
    I  have used BDC inside user exit.I am getting an error while activating the user exit .
    The error is before the statement 'FORM' the structure included by 'FUNCTION' must be ended by 'ENDFUNCTION'.(Not getting what 'FUNCTION' is mentioned in error message)
      CALL TRANSACTION 'MM02' USING bdcdata MODE v_mode UPDATE 'S'
                                                MESSAGES INTO it_bdcmsg1.
        ENDLOOP.
    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.
    IF fval <> nodata.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDIF.
    ENDFORM.                    "BDC_FIELD

    Hi,
    This is beacuse you are trying to nest  the processing block, more strictly procedures. This is not possible in ABAP.
    "Your customer exit simply lies between  these statements introducing procedure (funtion module)
    FUNCTION....
    INCLUDE some_customer_exit_here. 
    ENDFUNCTION
    You can't put any new procedure nor processing block inside this FUNCTION....ENDFUNCTION block.
    Instead you have two possibilities:
    - check function group of that function module, usually starts with X... for customer exists, add and include inside it, following SAP standard naming conventions for subroutines. It must be like inlcude ...F01 . Go inside there and create your subroutine (forms) here. Now in your cutomer exit simply use that form by calling it.
    - create another program of type S (subroutine pool) and place your forms here. Now call it from customer include using PERFORM YOUR_NEW_PROGRAM_NAME(subroutine_name).
    Regards
    Marcin

  • Call BDC in User Exit?

    Hi,
    Is it possible to call BDC in User Exits? Requirement is to update cusotmer master using by CALL TRANSACTION that called from a user exit.
    How to know the user exit name, If I already know the function module name and include name?
    Ex: Include - ZXVSVU02.
    Function Module - EXIT_SAPLVV02_001.
    <removed by moderator>
    Edited by: Thomas Zloch on Jun 8, 2010 12:44 PM

    Hi,
    Have you tried calling BDC through module pool program? if its going to wotk there, sure u will get it done from user exist......
    I have worked it through module pool.......all the best for ur try.....
    Kalyan

  • Hi Can body send links & Material For  Bapi, Badi,User-exits

    Hi Abapers,
                       Can body send links & Material For  Bapi, Badi,User-exits, This is my mail id [email protected]
    With Regards
    Bhaskar rao.M

    Hi Bhaskar,
    User Exit
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    USER EXITS
    https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=312792
    https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=1320078
    https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=2669896
    BADI(Business Add-In) is the object oriented method of user exits...
    Each BAdI has a definition and more than one implementation. The definition means the methods(in class concept) that are used for performing various functions. The BAdI definition can be viewed in SE18 transaction(for standard ones) and user-defined BAdIs can be created in the same transaction as well.
    When you create a BAdI definition, an class interface will be automatically created and you can define your methods in the interface. The implementation of the methods can be done in SE19 transaction
    Check these links for info about badi..
    BADI's
    BADI's
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    BADI's
    BADI's
    BADI's
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://www.esnips.com/web/BAdI
    http://www.allsaplinks.com/badi.html
    New to Badi
    Intro.....
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    diff betweem badi n customer exits........
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    BAPI
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Regards,
    Priyanka.

  • Name of the structure needed for sales order user exit

    Hi,
    I am planning to write a user exit which will insert the data into my ztable the moment the new sales order is created and is saved.
    I have identified FORM USEREXIT_SAVE_DOCUMENT as the necessary user exit. But the problem is that while inserting the data into the ztable I cannot insert the data from vbak as the data will be inserted into this table after the SO is saved.
    Thus I need to identify a structure which is used to populate the vbak table so that it simultaneously inserts the data in the ztable as well. Can anyone help me with the name of the structure so that these fields i.e. vbeln, vkorg, vtweg, spart are inserted into my ztable?
    Also need to know how to convert the net value i.e. vbak-netwr in Indian Rupees as it gets stored as Dollars ....
    Thanks,
    Vinod.

    Hi,
    One of the structure being used is RV45A, there are several other str's being used as well for various calculations,
    check out program SAPMV45A for the same.
    & in order to convert vbak-netwr to rupees use the below statemetnt,
    WRITE vbak-netwr TO zvbak-netwr CURRENCY INR.
    Regards,
    Raghavendra
    Message was edited by:
            raghavendra ay

  • Request for info. on USER EXIT/BADI for FB60

    Hi,
    This is with reference to FB60 user exit/badi for with holding tax.I want to use the customized table for withholding tax.
    ]Please guide some alternative solution rather than user exit and badi.
    I dont think the following user exit and badi are used for withholding tax.
    I done some analysies.I didnt find any user exit/badi related to withholding tax.I found the following
    F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002 FIDCC1: Change IDoc/do not send
    F050S003 FIDCC2: Change IDoc/do not send
    F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001 Balance Sheet Adjustment
    FARC0002 Additional Checks for Archiving MM Vendor Master Data
    FEDI0001 Function Exits for EDI in FI
    RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00 Line item display: Checking of selection conditions
    RFKORIEX Automatic correspondence
    SAPLF051 Workflow for FI (pre-capture, release for payment)
    Badi
    FQST_CALC_COUNTRY,FQST_CIN_WITHITEM are related with withholding tax and they are for country specific such as India.
    Every expert answer will be rewarded.
    Thanks in advance
    Cra

    Try Business Transaction Events. Transaction code BERP.
    Regards,
    Zoltá

  • Missing English documentation for WPUE0002 enhancemnt user-exits

    Hi all,
    I'd like to change some segment fields data before processing IDoc type WPUWBW, and I thought user-exit  EXIT_SAPLWPUE_141 from WPUE0002 enhancement could help me to do so.
    But, when I search for documentation on this module it doesn't exist in English, only in German. How can I get it in English?
    Or, anyone could tell me how to use it? Any examples?
    Thanks very much in advance,
    Maite.

    Hello Maite,
    just a brief summary of the documentation:
    Function module to check and/or modify IDOCs, before the POS inbound processing
    The original IDOC is transfered in table INPUT_IDOC_SEGMENTS of parameter I_INTERFACE. Only the modified segments have to be exported in table OUTPUT_CHANGED_IDOC_SEGMENTS.
    Log of modifications (if not switched off via parameter O_NO_LOGGING_REQUIRED):
    - EDI log - logs the modified segments (same as for modifications in EDI editor)
    - POS log - logs the modifications for each field
       O_NO_LOGGING_REQUIRED  =
       'P' write only POS log
       'X' write only EDI log
       'A' write minimum EDI log (one record per change transaction, independant from the no. of changes)
    Use parameter O_STOP_IDOC_PROCESSING to stop the IDOC processing. POS-Status 4 "refused by system" is set for the IDOC. For IDOCs with POS status 4, the user can decide, to process the IDOC. In this case, the parameter shouldn't be set again. The import table I_INTERFACE-WPLST contains records with "VERBUCHUNG" (UPDATE?) = '4' for the segments, the user decided to process again.
    When the IDOC has been processed, it cannot be refused completely. If parameter O_STOP_IDOC_PROCESSING is set in this case, the processing will be cancelled and message WP032 is written to the log.
    Messages for the processing logs can be exported in table OUTPUT_ERROR_MESSAGES.
    - Raising exceptions will cause a short dump. You can use MESSAGE ... RAISING to transfer error messages into the protocol.
    - Commit work not allowed
    - All database changes have to be done by update modules.
    Best regards
    Stephan

  • Help me for finding out user-exits in sap

    hi,
    i am subhasis . i want to know how u will know where the user-exits available.
    please replay.

    Hi,
    Go through this program and another way is there go through that also.
    1) Open CMOD(Project maintenance) Transaction. Enter a project name starting with Z. Press enter.
    2) Goto Enhancement window by clicking the enhancement button in the application tool bar.
    3) Write SUSR0001 in the enhancement column and press enter.
    4) Goto Components window (It will show all the exits included in this enhancement), in our case only one Function Exit will be shown.
    5) Double click on the Function exit EXIT_SAPLSUSF_001.  
         The following function source code will be displayed in the function editor
    just run this report u get badi
    REPORT ZNEGI16 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    Hi Crm_learner,
    gothrough this navigation.
    se93->provide for which transaction code u want to impliment the badi->display option->copy the package name.
    next
    se18->press f4 help->information system->provide the package name->enter
    It will display the all the badis.
    provode the badi name->select implimentation option in menubar->create->prvide the implimantation name->enter
    provide the implimantation shrt text->save the badi.
    Go for the interface option->double click onthe method->provide the coding in between method and endmethod. and active the badi.
    program automatically call this badi and execute u code.
    This is the badi.
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli. 
    Rewards some points.
    Rgds,
    P.Naganjana Reddy

  • Need Logic for writing the User exit

    Hi Gurus,
    I am writing the User Exit code to populate the 'Valid to' field in the data source.
    Technical Name - DATUB  and Type- DATS
    I am using the FM 'GET_STPO"
    My extract structure has following fields.
    MANDT
    MATNR
    WERKS
    STLAN
    STLNR
    STLAL
    STLTY
    STLKN
    STPOZ
    DATUV
    IDNRK
    PSWRK
    MEINS
    MENGE
    MTART
    DISMM
    DATUB
    I am not getting the DATUB value for some of the BOM Node Numbers(STLKN).
    Please suggest me as How Can I write the code?
    Thanks a lot.
    Shalaka.

    Hi ,
    You can also try this :
    int countold = 0;
    int countnew = 0;
    int k = 0;
    for(int i =0;i<var1.length;i++)
    countold = countnew + 1;
    countnew = countnew + Integer.parseInt(var1<i>);
    for( int j = countold-1 ;j<countnew;j++)
    result.addValue(var2[k]);
    k++;
    result.addContextChange();
    Regards,
    Ganesh

  • BPS Variable for hierarchy type User-Exit

    I try to make this type of variable.
    The variable is NCSTOPU, hierarchy is
    NHSTOPU like
    NHMAIN
    -- 4
        -- 401
        -- 402
        -- 403
      -- 5
         -- 501
         -- 502
         -- 503
    So The ABAP is
    FUNCTION ZCCB_AHR_VAR_HIER.
    *"*"Ëîêàëüíûé èíòåðôåéñ:
    *"  IMPORTING
    *"     REFERENCE(I_TYPE) TYPE  UPC_Y_VAR_TYPE
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
    *"     REFERENCE(IS_HIE_KEY) TYPE  UPC_YS_HIE_KEY
    *"  EXPORTING
    *"     REFERENCE(ET_HIE_NODES) TYPE  UPC_YT_HIESEL
    DATA ZHIER type upc_ys_hiesel.
    *CHANM  UPC_Y_CHANM
    *HIENM     UPC_Y_HIENM
    *HIEVER     UPC_Y_HIEVER
    *DATETO     UPC_Y_DATETO
    *NODENAME     UPC_Y_NODENAME
    *HIECHA     UPC_Y_CHANM
    *DUMMY_LEAF     UPC_Y_DUMMYLEAF
    *TO_CHADEP     UPC_YTO_CHADEP
    ZHIER-CHANM      = 'NCSTOPU'.
    ZHIER-HIENM      = 'NHSTOPU'.
    ZHIER-NODENAME   = '5'.
    ZHIER-HIEVER     = 'A'.
    ZHIER-HIECHA     = '5'.
    ZHIER-DUMMY_LEAF = ''.
    ZHIER-DATETO     = '99993112'.
    INSERT ZHIER INTO TABLE ET_HIE_NODES.
    ENDFUNCTION.
    But it doesn't work.
    The mistake is
    Selected node 5 does not exist
    The node 5  selected as the start value for characteristic 5 with the specified compound table does not exist in hierarchy NHSTOPU.
    What is the problem?

    Configuration of the variable:
    Variable Type - Hierarchy node,
    Characteristic - NCSTOPU,
    Hierarchy - NHSTOPU,
    Replacement type - user-exit,
    FUNCTION MODULE NAME - ZCCB_AHR_VAR_HIER.
    In the planning level the characteristic NCSTOPU is set with this variable.
    In the Layout  1) the characteristic NCSTOPU - Lead Column,
                         2) Hierarchy in the lead column -  Hierarchical Data Model, BW Hierarchy

  • BDC  in  user exit CONFPP05 - Material  already used by User

    I have requirement to  create  551 movement Scrap from CO11N  tcode whener user enters value for  'Yield'  and 'Reason for variance'   and press save button( Post).
    I am unable to use BAPI  because BAPI_GOODSMVT_CREATE (GMCODE 03= MB1A) since 551 mvmt can be done only through  custom Tcode  ZMB1A due to customization.  Only option left was calling BDC  for ZMB1A  ( Call trasnaction been used) .
    Problem:
    BDC works outside as report program , but hen  I call FM ( BDC) within userexit , it says Material lock by the user( Which is Me).
    Calling from UserEXIT  CONFPP05
    CALL FUNCTION 'Z_POST_SCRAP_GI'  ( Nothing but BDC  call tran)
      EXPORTING
       MODE          = 'N'
       UPDATE        = 'L'
        bwart         = mseg-bwart
        werks         = mseg-werks
        grund         = mseg-grund
        lgort         =  afpo-lgort
        matnr         = mseg-matnr
        erfmg         = mseg-erfmg
        erfme         = mseg-erfme
        aufnr         = afpo-aufnr
    TABLES
       MESSTAB       = MESSTAB .
    This one works as  report and not inside Userexit ( Returs errmsg already used by User which is myself).

    Here is the Dump,  I am taking about after calling FM with Update Task
    Category               ABAP Programming Error
    Runtime Errors         POSTING_ILLEGAL_STATEMENT
    ABAP Program           SAPLY_FGRP
    Application Component  Not Assigned
    Date and Time          03/06/2012 11:55:13
    Short text                                                                               
    Statement "CALL TRANSACTION" is not allowed in this form.                                   
    |What happened?                                                                               
    Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLY_FGRP" had to be terminated because it has                   
        come across a statement that unfortunately cannot be executed.                            
    What can you do?                                                                               
    Note down which actions and inputs caused the error.                                                                               
    To process the problem further, contact you SAP system 
        administrator.                                                                               
    Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also           
        keep them for a long time.                                                           
    Error analysis                                                                               
    There is probably an error in the program                                                    
        "SAPLY_FGRP".                                                                               
    This program is triggered in the update task. There, the            
        following ABAP/4 statements are not allowed:                                                                               
    -  CALL SCREEN                                                                 
        -  CALL DIALOG                                                                 
        -  CALL TRANSACTION
    -  SUBMIT
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "POSTING_ILLEGAL_STATEMENT" " "
    "SAPLY_FGRP" or "Y_ZMB1A_BDCREXCY"
    "BDC_TRANSACTION"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    Source Code Extract
    Line
    SourceCde
    27
                       HOLDDATE = P_HOLDDATE.
    28
      ENDIF.
    29
    *ENDFORM.
    30
    31
    32
      end batchinput session                                             *
    33
    34
    *FORM CLOSE_GROUP USING P_CTU LIKE APQI-PUTACTIVE.
    35
    IF P_CTU <> 'X'.
    36
    close batchinput group
    37
       CALL FUNCTION 'BDC_CLOSE_GROUP'.
    38
    ENDIF.
    39
    *ENDFORM.
    40
    41
    42
           Start new transaction according to parameters                 *
    43
    44
    FORM BDC_TRANSACTION TABLES P_MESSTAB
    45
    USING  P_TCODE
    46
                               P_CTU
    47
    P_MODE
    48
    P_UPDATE.
    49
    DATA: L_SUBRC LIKE SY-SUBRC.
    50
    51
    IF P_CTU <> 'X'.
    52
       CALL FUNCTION 'BDC_INSERT'
    53
            EXPORTING  TCODE     = P_TCODE
    54
            TABLES     DYNPROTAB = BDCDATA
    55
            EXCEPTIONS OTHERS    = 1.
    56
    ELSE.
    >>>>>
    CALL TRANSACTION P_TCODE USING BDCDATA
    58
    MODE   P_MODE
    59
    UPDATE CUPDATE
    60
    MESSAGES INTO P_MESSTAB.
    61
    ENDIF.
    62
    L_SUBRC = SY-SUBRC.
    63
    REFRESH BDCDATA.
    64
    SY-SUBRC = L_SUBRC.
    65
    ENDFORM.
    66
    67
    68
           Start new screen                                              *
    69
    70
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    71
    CLEAR BDCDATA.
    72
    BDCDATA-PROGRAM  = PROGRAM.
    73
    BDCDATA-DYNPRO   = DYNPRO.
    74
    BDCDATA-DYNBEGIN = 'X'.
    75
    APPEND BDCDATA.
    76
    ENDFORM.
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    7 FORM         SAPLY_FGRP                          Y_ZMB1A_BDCREXCY                       57
    BDC_TRANSACTION
    6 FUNCTION     SAPLY_FGRP                          LY_FGRPU02                             81
    Y_POST_SCRAP_GI
    5 FORM         SAPLY_FGRP                          LY_FGRPU02                              1
    Y_POST_SCRAP_GI
    4 FORM         RSM13000                            RSM13000                             5513
    VB_CALL_FUNC
    3 FORM         RSM13000                            RSM13000                             5219
    VB_V1_EXEC
    2 FORM         RSM13000                            RSM13000                             3952
    VB_V1_NORMAL
    1 MODULE (PBO) RSM13000                            RSM13000                             3801
    VBEXEC
    Chosen variables

  • Error in BDC within user exit

    Hi All,
    I am trying to generate a BDC recording within a function exit. I have declared the BDCRECX1 include within the TOP include of the function group. But the include BDCRECX1 which actually contains all the FORMs also contains a selection-screen defined in it. I am not able to activate it because it gives me the following error "SELECTION-SCREEN statements can only be used between SELECTION-SCREEN BEGIN and END OF SCREEN (program type is not "1")" Is it because we are not allowed to define a selection screen between Function-Endfunction which defines a function exit?
    Please let me know why this error is generated and the step to rectify it.

    Hi Nagaraj,
    What Smitha is trying to accomplish here is reuse the subroutines that are available within the INCLUDE bdcrecx1.
    Smitha - You cannot re-use the INCLUDE bdcrecx1 as it is, you will have to create a copy of it and take out all the code that relates to selection screen and reference to these selection parameters within the subroutines, as selection screen can be in programs type "1" - that is executable/report programs.
    I guess you will need only the subroutines FORM BDC_DYNPRO USING PROGRAM DYNPRO. and FORM BDC_FIELD USING FNAM FVAL. just copy these routines into a new include. And you can use declare BDCDATA in the global data of the Function group.
    If you ask me, i guess you could just write these 10-15 lines of code within the same include of the function exit and proceed rather than taking all this trouble.
    Regards,
    Chen

  • Generic Table to a formal type - for master data user exit class

    Hello,
         I am attempting to setup an ABAP OO framework for extending master data with the CMOD exit, EXIT_SAPLRSAP_002.  My goal is to create generic base class, upcast to the actual extraction structure, apply the customizing data fields, and then return the full table to the exit.    The problem is that I_T_DATA, the internal table for return values is untyped and therefore generic.   I tried using a class parameter as “type ref to DATA”, but the upcast if failing is failing.  Can any one suggest:
    What parameter type should I use for the class method parameter?
    How do you upcast to the formal extract structure type?
    How do you assign the result back to the generic type?
    Thanks very much for the help!

    I ended up figuring out the answer after a bit more work.  In case it helps others, the keys points are:
    I_T_DATA exposed in EXIT_SAPLRSAP_00x is a dynamic internal table
    The reference to the table can be passed to a method parameter as a generic type, “TABLE”
    Though, to store the value in the class as a formally typed value, such as required by an attribute, the type must be cast to the type, “DATA”.
    For example:
    Public section
    Method CONSTRUCTUR
         IMPORTS
          PT_DATA TYPE TABLE.
    Assign data pointer to attribute
           GET REFERENCE OF PT_DATA INTO A_T_DATA.
    Endmethod.
    protected section.
      data A_T_DATA type ref to DATA .
    Hope that helps.

  • COPA Report Changes in KE30 for Configured materials - User Exit

    Dear all,
    We are having a configured material with BOM and we are using COPA Report.
    For a given material type we need the row "Other cost of Goods Sold" to be zero since it does not take into account the child materials.
    Is there any userexit to make this happen ??
    Thanks in advance.
    Regards,
    Vivek.

    Hi Vivek,
    KE30 is a Transaction code. If you want to copy a Report associated with this Transaction code then go to transaction code KE30 Provide the data a initial screen. Then go to Utilities->status. A popup screen will be displayed. In SAP data tab There is a field called Program. Copy that program name & go to transaction code SE80 & provide the program name & go for display. Here all the related screens, fields, tables etc. will be displayed then right click on the program name & select copy & provide the target program name starting from Z. Save & activate it.
    Note you can copy the standard program & copy it also but I think it will not take place the standard porgram, you will have to run the progam manually.
    I think BADI or BTE may be available for this transaction.
    Ashven

  • How to define a global field for use in User exit

    Hi All,
    I want to define a global flag field (say my_flag) in Function group VEDA. I need to set/reset it in exit EXIT_SAPLVEDA_003 and check its value in EXIT_SAPLVEDA_002.
    Can anyone help me out in this. Where can I define this field?
    Thanks.
    Regards,
    Riyaz

    I have created a customer table zflag1 which has one field z_flag and the correspopndiong data el;ement is 'zflag' and i also ccreated parameter ID in table TPARA and assigned tht parameter ID 'ZFLAG' to my data element.
    reward points if helps..
    in the Z include of Exit function 3 write -
    data :g_global like zflag1-z_flag.
    G_GLOBAL = 'X'.
    set parameter id 'ZFLAG' field g_global.
    and in the Z include of exit function 2 write  -
    DATA G_GLOBAL LIKE ZFLAG1-Z_FLAG.
    GET PARAMETER ID 'ZFLAG' FIELD G_GLOBAL.

Maybe you are looking for