Abap  questions

Hi !
I wanted to ask few Abap questions :
1. How do i show a calendar on select options date field ?
2. what is the name of the function for changes currencies of field ? for example i need to change from type Usd to Euro ?
3. What is the function for abstract , adding dates fields ? ( not to take in account a  Saturday and not working days ).
thanks
moshe

Hi Moshe,
For Calender if you any field to which the domain DATUM is assigned it shows calender.
for eg,
select-options date for P0000_AF-hiredate.
You can try the function module to add the days WDKAL_DATE_ADD_FKDAYS.
One of the function modules to convert currency is HR_ECM_CONVERT_CURRENCY
Thanks
Lakshman

Similar Messages

  • A simple ABAP question

    Friends,
    I am intrigued with the following date comparison logic. This is a small snippet that I cut&paste from SAP code and modified to check whether the logic is correct.
    the logic below writes STATUS 68. From SAP point of view and I agree, that it should not write 68.
    Can you please elaborate the problem here.
    Thanks in advance.
    William
    DATA: i_aedat type sy-datum,  " Equipment Change date in the decentral
          l_aedat type sy-datum.  " Equipment Change date in the central.
    I_aedat = '20120119'. "From deployed
    L_aedat = '20120118'. "In central
    * posting in Central
      if l_aedat  is not initial.
    *...change mode
        if I_aedat < L_aedat.
    *.....existing entry is the actual one,
    *.....we don't won't overtake old data
          write: / 'status 68'.
        endif.
      endif.
    Moderator message: please choose more descriptive titles for your posts, everybody here has ABAP questions...
    Edited by: Thomas Zloch on Feb 20, 2012

    Ok, here is the function module
    Please note i_aedat is the change date in the decentral and l_aedat is the changed date in the central
    The function module determine whether the existing central date is before the Decentrla date.
    If so it would update the central data with decentral data.
    Code below produce 68 at our installation and it does not with Vijaj and Patrick. I concur with their reply.
    The code that I have provided is how the function module behaves.
    So is it a kernel issue?
    Any help is much appreciated.
    Thanks
    William
    function /isdfps/etups_maintain_chk.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(I_EQUNR) TYPE  EQUNR
    *"     REFERENCE(I_AEDAT) TYPE  AEDAT
    *"  EXCEPTIONS
    *"      NOT_ALLOWED
      data: l_aedat  like equi-aedat.
      select single aedat into l_aedat
        from equi
       where equnr = i_equnr.
      if sy-subrc is initial and
         l_aedat  is not initial.
    *...change mode
        if i_aedat < l_aedat.
    *.....existing entry is the actual one,
    *.....we don't won't overtake old data
          raise not_allowed.
        endif.
      endif.
    endfunction.

  • Havent a clue! Please help! Easy ABAP Question!

    Helly Gurus
    I am loading from a dso to a cube and doing a lookup on a second dso.
    eg
    'Name' is in the DSO1
    I lookup 'Address' from DSO2
    Then load to the cube.
    The problem is there may be more than one address so although I have coded the lookup to
    find all addresses, I do know how to get these into my results.
    Only the first address it finds is there.
    loop at DATA_PACKAGE.
        select * from DSO1 where
        NAME = DATA_PACKAGE-NAME.
        if sy-subrc = 0.
          move-corresponding DSO2 to itab1. collect itab1.
        endif.
        endselect.
      endloop.
    What do I need to do to get all of the results?
    I am in 3.5 so do not have the use of an End Routine.
    Thanks
    Tom Tom

    you need to do several treatments in fact you need to add records on the data_package (by the way it is not an easy ABAP question as you mentioned !)
    So
    Treatment 1: select all the records from ods2 table of adresses outside the loop
        select names adresses
        from ods2
        into table g_itab_ods2
          for all entries in data_package
          where name eq data_package-name.
    Treatment 2: delete double records of the internal table.
        delete adjacent duplicates from g_itab_ods2 comparing names adresses.
    Treatment 3: loop over the data_package. Within this loop read the internal ods2 table and loop over it to assign the corresponding adresses. Then append the results to the temporary data_package_tmp and move all the records to the initial data_package.
    loop at data_package assigning <data_fields>.
       read table g_itab_ods2 into l_g_itab_ods2
          with key name = <data_fields>-name.
          if sy-subrc eq 0.
            loop at g_itab_ods2 assigning <adresses>
            where name                = <data_fields>-name.
              <data_fields>-adresses= <adresses>-adresses.
              append <data_fields> to lt_data_package_tmp.
            endloop.
          endif.
        endloop.
        data_package[] = lt_data_package_tmp[].
    free lt_data_package_tmp.
    this should do what you want to do. hope this could help you out.

  • Update Routine ABAP question

    Hi,
    I am updating data between two ODS objects using some update routines. I would like to write the following routine (in pseudo code):
    ++++++++++++++++++++++++++++++++++++++++++++++++++++
    Check if the characteristic i am updating is not null
    IF COMM_STRUCTURE-field1 = 'value1'     AND
             COMM_STRUCTURE-field2 = 'value2'.
    RESULT COMM_STRUCTURE-field3.
    ELSE.
    Don't update anything
    END IF
    +++++++++++++++++++++++++++++++++++++++++++++++++++
    My questions:
    1. How i tell the routine not to update anything (as specified in the pseudo code)?
    2. How i can check that the characteristic i woul like to update is not null?
    3. What is the preferred debug method in case i do not use the PSA?
    BR,
    Xibi

    Thanks Siggi for your prompt and helpful answer. There are however some fundamental things which are not fully clear to me (BTW, where i can find some good documentation on ABAP for BW??):
    > Hi,
    >
    > 1. How i tell the routine not to update anything (as
    > specified in the pseudo code)?
    >
    > set the returncode to a value <> 0.
    I wrote the following:
    returncode = 1.
    Consequently the updated failed. Maybe i am doing something wrong but my intention is not to have the whole thing fail, but rather skip the update for some records.
    > 2. How i can check that the characteristic i woul
    > like to update is not null?
    >
    > if not comm_structure-<fieldname> is initial.
    The problem is that the characteristic i am trying to update is not contained in the source ODS but only in the target one. Will "if not comm_structure-<fieldname> is initial" still work in this case?
    >
    > 3. What is the preferred debug method in case i do
    > not use the PSA?
    >
    > Without psa, you need to add a endless loop:
    > statics: st_flag type c value '0'.
    >
    > while st_flag = '0'.
    > break-point.
    > endwhile.
    >
    >
    > Hope this helps!
    >
    > regards
    >
    > Siggi

  • Abap Questions Needed

    Hi,
    Could anyone please send me the abap certification questions or any mock questionnaire on abap to my mail id?
    I have already gone through the forum and found some useful links.Request you not to provide any links to me but just mail me the docs to my mail id:[email protected]
    Request you to please provide the answers as well.
    Thanks in advance for your help.
    Sandeep.
    Edited by: Sandeep Ram on Mar 25, 2008 4:31 PM

    Done

  • SD ABAP Questions for functional

    Hi People,
                       Can some body please help out about how much of the ABAP is expected to be known by a SAP SD functional consultant?Please list some usual  questions asked to SD functional regarding ABAP?

    Hi,
    Depend upon your experience you ABAP knowledge will be expected and generally we have to know the tables, fields, user exits etc., to prepare functional specifications for any enhancements, reports or forms etc.,
    regards

  • Please Guys this is the OO Forum not General Abap QUESTIONS.

    Hi everyone
    This is the OO Forum. There's often stuff here which really has nothing to do with OO.
    <b>For example the question on Table Controls and BDC -- sorry poster of that topic I'm not trying to have a go at you but defintely the wrong forum for that post.
    There's another post at hiding source code.
    This also has NOTHING WHATSOEVER to do with OO  / ABAP objects.</b>
    I think for people who want answers to their questions whether OO related or not will probably get  a much better response if they post to the correct Forum.
    Posting totally non OO related stuff to this Forum not only reduces the usefulness of this Forum to people who genuinely are looking for OO information / answers but also makes it difficult for people to answer your "non OO" question as they are unlikely to be reading this forum.
    I'm not trying to be too difficult here but keeping most posts On Topic makes the Forum far more useful to everyone genuinely interested in OO .
    Cheers
    Jimbo

    $299 for the 16GB White which is what I have and as for contracts it is true must buy a contract. now i have heard of people buying the contract and phone then paying the $200 surcharg to end contract then user void phone by cracking it and go through some other companies this is HIGHLEY not advise considering APPLE will not touch your phone once you do so. your running a HIGH risk of errors and I dont even think iTunes will recognize it will it?. and tamara up there $1680 for contract fees *** is that i walked out of store with 16GB White and service for only $389 and first bill with activation charges was only $175, although i do think it is somewhat chincy that you wasnt text need seperate plan phone calls? also need seperate plan. bringing your average mo. price to around $100. **** my WORK phone is only 60 bux a month and has WAY more talk time and texting emails and datat than iPhone Service. I love iPhones safari though. very solid.

  • Web Dynpro For ABAP Question

    Hi all,
    I'm creating Adobe Interactive forms in Web Dynpro for ABAP.
    <b>Problem:</b>
    <b>Context defined in the created "View" is not displayed in the 'templates' (Adobe Interactive Form in the "Data View" tab.</b>
    I'm following the exact steps used in the following e-learning class:
    <b>https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3</b>
    Except I'm creating 'string' fields instead of numeric fields like in the above e-learning class and creating my forms in Adobe Livecycle designer first then importing them to the web dynpro for abap - 'templates'.
    The 1st form I created went well and works fine.
    <b>Question:</b>
    For my second and third form I'm unable to map my context fields they are not displayed in the "Data View" anyone know why this is not possible?
    Cheers,
    Dharm

    Hello,
    are you creating the form via forward navigation from webdynpro abap?
    When you do that the context of the form should be created automaticaly.
    What Basis SP level are you using?
    Best regards,
    Dezso

  • ABAP Question

    Hello, I have a question. My scenario is to code in user exit in ECC system and get multiple entries. meaning:
    I have a table called Totals table and another table called Line Item. 
    Totals table has one document and Line item has 2 line item document for that one document.
    I want to code in user exit that will get both documents in Line Item table.
    What is this process called in ABAP? I am looking for its syntax.  I have done coding where I only fill the field if sy-subrac = 0 but have never added more than one line to the package.
    Thanks.

    Please check if this one is equivalent field
    DMSHB
    This is present in DataSource
    I am little bit confused looking at my system because Amount in Local Currency should be present by default and it gets data from BSEG for 0FI_GL_14 as per this link http://help.sap.com/saphelp_nw70/helpdata/en/45/4f8e8bbf3f4f63a5dd197ef7d53fa2/content.htm
    Extract structureneeds to be enhance with this Include structure...that's all
    FAGLPOSE_CORE
    This will contain your required field
    You might also need to have a look at https://service.sap.com/sap/support/notes/1265825
    Regards
    Anindya
    Edited by: Anindya Bose on Feb 5, 2012 6:51 AM

  • Answers to these ABAP Questions

    Hi Everyone,
    It would very nice of your guys to answer these questions for me.
    <b>1.     Which is related to Debugging function?
          1.Modify     2. Continue     3. Switch 4.Change
    2.     In DO and ENDDO the following statement occurs ?
    1.     Read Sy-Index     
    2.     Read line sy-index
    3.     Read list sy-lilli
    4.     Read list sy-index
    3.     After the following statement in APAP   immediately triggers END-OF-SELECTION?
           1.Stop     2.Exit     3.Continue     4.Check
    4.     The following statement inserts the record in internal table?
          1.Append     2.Select   3.Insert     4.Read
    5.     In batch input the following structure is used to insert the transaction data ?
          1.BDC     2.BDCDATA 3.BDCTABLE     4.BDCTAB
    6.     The function WS_UPLOAD will be used in the following server?
    1. Application  2.Presentation     3.Database   4.     All     
    7.     The Following statement is correct in case of Application Server while creating a file?
    1.     OPEN DATASET FOR INPUT
    2.     OPEN DATASET FOR WRITING
    3.     OPEN DATASET FOR INSERTING
    4.     OPEN DATASET FOR APPENDING
    8.     The following statement is used append the record, with the same key fields and the amount will be added to the current value?
    1.APPEND     2.Collect    3. INSERT     4.DELETE
    9.     The following is required while creating a table?
    1.     Data element and Domain     
    2.     Data and types
    3.     Domain and  types
    4.     Data element and data statement
    10.     The module pool program is belongs to?
    1.Executable     2. Program type M      3.User Exits     4.Function module
    11.     At selection-screen, which is the statement, will overwrite the default values?
    1.Initialization     2.Start of Selection     
    3.Top-of-page      4.End-of-page
    12.     In Batch input session in Call transaction if the error occurs immediately triggers the following
    1.Creates a session     2. Creates Error log     
    3.SY-subrc ne 0      4.EXIT
    13.     What is the width of the report?
    1.120     2.257     3.255
    14.     What is the NAMESPACES in SAP?
    15.     At LINE-SELECTION the following one will trigger?
    1.PICK     2.PF05     3.BACK     4.SY-UCOMM
    16.     The function codes will be stored in the following system field?
    1.SY-UCOMM  2.SY-LISEL     3.SY-OKCODE  4.SY-INDEX
    17.     In BATCH Input, which is the okcode, will terminate the entire Session?
    1./bdel      2./bend  3./n     4./okcode
    18.     In which case will create pop up window?
    1.CALL SCREEN     2.SET SCREEN     3.WINDOW STARTING AT .. Endat  4.CALL SCREEN at … endat.
    19.     The following statement will insert fields in the Standard SAP table?
    1.APPEND STRUCTUREs     2.VIEWS      3.INSERT 4.STRUCTURES
    20.     Which is the system field will store the function codes at AT USER-COMMAND
    1.SY-UCOMM     2. SY-OKCODE     3.SY-LISEL 4.SY-INDEX</b>     
    Thanks a lot,
    Prashant.

    Hi Prashant,
    Here are the answers:
    <b>1.</b> Which is related to Debugging function?
    <b> Continue</b>
    <b>2.</b> In DO and ENDDO the following statement occurs ?
    <b> Read Sy-Index</b>
    <b>3.</b> After the following statement in APAP immediately triggers END-OF-SELECTION?
    <b>Stop</b>
    <b>4.</b> The following statement inserts the record in internal table?
    <b>Append</b>
    <b>5.</b> In batch input the following structure is used to insert the transaction data ?
    <b>BDCDATA</b>
    <b>6.</b> The function WS_UPLOAD will be used in the following server?
    <b>Application</b>
    <b>7.</b> The Following statement is correct in case of Application Server while creating a file?
    <b> OPEN DATASET FOR INPUT</b>
    <b>
    8.</b> The following statement is used append the record, with the same key fields and the amount will be added to the current value?
    <b>Collect</b>
    <b>9.</b> The following is required while creating a table?
    <b> Data element and Domain</b>
    <b>
    10.</b> The module pool program is belongs to?
    Program type M
    <b>11.</b> At selection-screen, which is the statement, will overwrite the default values?
    <b>
    Initialization</b>
    <b>12</b>. In Batch input session in Call transaction if the error occurs immediately triggers the following
    <b>
    SY-subrc ne 0</b>
    <b>13.</b> What is the width of the report?
    <b>255</b>
    <b>15.</b> At LINE-SELECTION the following one will trigger?
    <b>PICK</b>
    <b>16.</b> The function codes will be stored in the following system field?
    <b>SY-UCOMM</b>
    <b>17</b>. In BATCH Input, which is the okcode, will terminate the entire Session?
    <b>/okcode</b>
    <b>18.</b> In which case will create pop up window?
    <b>WINDOW STARTING AT .. Endat</b>
    <b>
    19.</b> The following statement will insert fields in the Standard SAP table?
    <b>APPEND STRUCTUREs</b>
    <b>20.</b> Which is the system field will store the function codes at AT USER-COMMAND
    <b>SY-UCOMM</b>
    Hope this helps you,
    Regards,
    Pragya

  • Some ABAP Questions?

    Can anyone give the answers to the following questions?
    1. Can u tell me the sequence to triggering of INITIALIZATION , AT SELECTION-SCREEN, AT SELECTION-SCREEN OUTPUT & 
    AT SELECTION-SCREEN on field.
    2. WHT is the diffrence between the two selection-screen of LDB PNP?
    3. Wht is SIGNATURE in BADI implementation?
    4. How to get the footer at the end of page when the output is only 10 records, where as there are 100 lines declared for output?

    Hi
    1.
    1. Initialization
    2. At selection-screen output
    3. At selection-screen
    4. At selection-screen on <field>
    5. Start-of-selection
    6. End-of-selection
    7. Top-of-page
    8. End-of-page
    9. At pf<key>  “Interactive reporting”
    10.At line-selection  “Interactive reporting”
    11.At user-command “Interactive reporting”
    12.Top-of-page during line selection “I reporting”
    2. The selection screens are different for allowing different selection criterien.
    u can check the link http://www.planetsap.com/HR_ABAP_LDB.htm
    3. Not sure
    4. check this.
    you can give the line count for the output in the report as follows(example):
    REPORT  Z_REPORT001 MESSAGE-ID Z_MSG1 NO STANDARD PAGE HEADING LINE-SIZE
    255 <b>LINE-COUNT 65(3).</b>
    here lines are 65 and out of which 3 are for header and footer.
    and u can give the header and footer in Top-of-Page and End-of-Page.
    Regards
    Asha

  • HR-ABAP question

    Hello All.
    i am a functional guy but my abaper is having trouble to fix this so i am asking this here if anyone had done this.
    We have developed a Pension report which Picks /102 for CRT  and RT table like Reconcilliation report but, when u ran recon lets say for 01/01 to 12/31/2006 and there are two records for last payperiod, Active and Previous, they are
         pp   IN              For
    A  26   03/2007      26/2006
    P   26   26/206        26/2006.
       Recon is picking values from this Previous record as we have end date 12/31/2206 but our report picking values from Active period which we dont want, my idea would be Go in A record look for INPER and FPPER if same then take values if not then ........Go in P look INPER and FPPER take values.
    Also if some ee have two personal areas we are taking them from RT, how could we achieve same when going thru each RT table.
    i am not a programer but still if you could provide me something so i could tell my abaper to go with that.
    Thanks all
    abhijit

    I am more confused than before or you didn't got what actually i want,
    If for same Pperiod we have A and P, and recon is taking P with  same INPER and FPPER as there was retrocalc and for A record INPER and FPPER are different. If we choose the end date in between A and P record, recon taking Passive record but mine's taking Active record, how can we prgram to say do not consider record who has INPER and FPPER after the end date.
    Thanks anyway.
    abhijit

  • RE: ABAP QUESTIONS ASKED AT ONE OF THE INTERVIEW

    Which software component in the work process controls both commit and rollbacks? 
    "      Woman is generally one for Commitment, Man for Rollback.
    Can the IDoc be passed to multiple servers ? If yes how? if no why?
    "      The Eye Doc serves multiple people, but one at a time with an appointment.
    When will be the RFC Connection Closed?
    "      The RFC Connection never closes – open 24 hours – bit of a rough club though.
    Waht are the types of transport requests?
    "      Land, Sea, Air, Rail.
    How many At-Exit commands are possible in PBO Module?
    "      Depends how big they are – you can pack lots more small ones in – not sure if this counts towards record.
    What are the ABAP Statements to create a new internal session in the same external session?
    "      Open Sesame.
    Are all the BAPIs are Auto-committed? if no,How to do it?
    "      Some are / some aren’t – see answer to Q 1.
    How many secondary indexes are possible for a table?
    "      There should be four for a normal table, one at each corner to keep it level.
    For F1 help,where will be the data come from?
    "      The FIA’s World Motorsport Council is the controlling body for F1 – they should provide data.
    Which statement stops the execution of current screen?
    "      The execution will only be stopped on receipt of a signed pardon from the governor.
    What will be the statement to send the values among indentical fieldnames between structures?
    "      True identical fieldnames with identical DNA make up 0.2% of the world’s population – values are sent between them by normal speech.
    The file RGS does not exist in application server .what happens if we write OPEN DATASET RGS FOR APPENDING?
    "      Only a qualified doctor should open your dataset up to check or remove your APPENDING.
    What is the tcode to adjust a table?
    "      The tcode to adjust a table depends on what is wrong – if not level, use a saw – if loose, use a hammer.
    What is the difference between Message and message types?
    "      The types message has been prepared on a typeswriter, the Message has been hand writ.
    Partner profiles stores in table -
    "      Normally stores in drawer under table.
    online messages will be in which table?
    "      The messages are normally left on side of fridge, not on table.
    SMOD and CMOD Enhancements will be stored in----
    "      The MOD Squad storeroom (or did you mean British M.O.D.? – they store stuff all over England).
    Call Screen Vs Set screen?
    "      The Call screen stops the kids from getting inappropriate phone calls.  The Set screen can be left in place in front of fire place to stop sparks.
    Use of MODIFY SCREEN?
    "      To fit it around the fire place.
    What is the program to verify the RFC Logs?
    "      There is no need to verify – just toss them on the fire – all logs burn.
    In LSMW,after creating the structure definitions,what are the programs that are generated?
    "      The generator runs on LPG not LSMW.  Only use it when the power goes off.
    looking for the answers and It may be very helpful to all the ABAPers.
    Thanks to SDN Community for Sharing.
    Sorry,
    Couldn't resist.
    Andrew

    just tried open sesame cause it sounded quiet usefull.
    "DATASET ...", "CURSOR ... FOR SELECT", or "CURSOR WITH HOLD ... FOR
    SELECT" expected after "OPEN" .
    hmmm .. what now ... can't get my job done ...
    what is dataset?
    what is cursor and what is it good for?
    what is ... and how do i use it?
    what is for select?
    what isCURSOR WITH HOLD ... FOR SELECT and what can a cursor hold?
    what is OPEN?
    Message was edited by:
            Sascha Dingeldey

  • ABAP question: define a custom foreign key for a standard field??

    Hi,
    I want to use the field ADDR1_DATA-STR_SUPPL3 for customer use. I must to define a foreign key against a Ztable (as verification table) for this standard field. Also I must to define a custom search help.
    To defining a foreign key for this field, I must be in change mode, so the system ask to me for registering the object. That means this action is a modification. My question is the following: is there any way to do so without SAP standar modification??
    For instance, using BDT events...but how?
    Thanks in advance.
    Regards,
    Rosa

    Hi Rosa,
    Changing SAP Standard dictionary elements is not possible with out changing the same. To change these elements, we dont have any other method apart from SAP standard modification.
    Cheers
    Pavan

  • Newbie OO ABAP question

    gr_sorts type ref to cl_salv_sorts.
    gr_sorts = gr_table->get_sorts( ).
    gr_sorts->add_sort( columnname  = 'MATNR'   sequence = if_salv_c_sort=>sort_down   subtotal = abap_true ).
    Take a look at these statements. sequence has been assigned a contant of sort_down. But sort_down exists in interface if_salv_c_sort. And in my code, add_sort is a method in cl_salv_sorts. So how to find out what the relationship between if_salv_c_sort and class cl_salv_sorts it? I found out that if_salv_c_sort is an interface in class cl_salv_sort, but in class cl_salv_sorts, I am unable to find any relationship. Also I know that abap_true is a constant, but where is it located and how does class cl_salv_sorts have access to it. Thank you for your help.

    Read ABAP Objects Book

Maybe you are looking for

  • Forwarding aol mail to .mac

    Does anybody know what incoming mail server settings are required to forward aol email to .mac? I tried using "imap.aol.com" in incoming mail server without any luck.

  • Adjustment Layer for Shapes

    Hey Guys, So I was having to change a bunch of properties of multiple shape layers and I was thinking, Wouldn't it be cool to have shape adjustment layers? Example: You have 10 different shape layers  - 5 Squares and 5 triangles Create a new shape ad

  • Having problem with iOS 6 and the App Store?

    I have just downloaded iOS 6. Now when I go to my App Store there are no app coming up. It looks like to searches for them, but once complete there is nothing. Please help Thanks

  • Nonrepeatable reads & phantom reads

    hi whats the difference nonrepetable(fuzzy) read & phantom read phenomena. from the docs i undertand they both are same but non repetable reads signify that modified or deleted rows committed by other transactions can be seen by the same query when r

  • Form Onload Javascript error

    Form Onload Javascript error Hello, Receiving onload javascript error on the form (see attached file). Any one ever encountered this before ? (NewScale 2008.3, IE 7) Thanks in advance for any help! - Mihir