How to get footer only in last page of report

anybody tell me
1).how to get footer only in last page while we are displaying reports
    and header only in first page .
2) how to create search help and how to use it .
3) how to create lock objects and how can we use it

Hi
This posting has an example of using a splitter container:
Changing width of a custom container dynamically
This posting has a discussion about using TOP-OF-PAGE:
Display Page numbers in ALV
This posting has an example of using picture control:
Insert picture in selection screen.
This posting has an example of putting a picture on top of an ALV grid:
Logo in OO ALV Grid
The page footer is defined using the statement END-OF-PAGE.
The processing block following END-OF-PAGE is processed only if you reserve lines for the footer in the LINE-COUNT option of the REPORT statement.
<u><b>CREATION:</b></u>
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
<b>Creating Search Help:</b>
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_imp.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee2b446011d189700000e8322d00/frameset.htm
A lock object is a virtual link of several SAP tables which is used to synchronize simultaneous access by two users to the same set of data ( SAP lock concept).
Locks are requested and released in the programming of online transactions by calling certain function modules which are automatically generated from the definition of the lock objects. These lock objects must be explicitly created in the ABAP Dictionary.
<b>To set locks, you must perform the following steps:</b>
1. You must define a lock object in the ABAP Dictionary. The name of the lock object should begin with E.
2. The function modules for requesting and releasing locks which are created automatically when the lock object is activated must be linked to the programming of the relevant online transactions.
<u><b>Reasons for Setting Locks</b></u>
Suppose a travel agent want to book a flight. The customer wants to fly to a particular city with a certain airline on a certain day. The booking must only be possible if there are still free places on the flight. To avoid the possibility of overbooking, the database entry corresponding to the flight must be locked against access from other transactions. This ensures that one user can find out the number of free places, make the booking, and change the number of free places without the data being changed in the meantime by another transaction.
<u><b>Lock Mechanisms in the Database System</b></u>
The database system automatically sets database locks when it receives change statements (INSERT, UPDATE, MODIFY, DELETE) from a program. Database locks are physical locks on the database entries affected by these statements. You can only set a lock for an existing database entry, since the lock mechanism uses a lock flag in the entry. These flags are automatically deleted in each database commit. This means that database locks can never be set for longer than a single database LUW; in other words, a single dialog step in an R/3 application program.
Physical locks in the database system are therefore insufficient for the requirements of an R/3 transaction. Locks in the R/3 System must remain set for the duration of a whole SAP LUW, that is, over several dialog steps. They must also be capable of being handled by different work processes and even different application servers. Consequently, each lock must apply on all servers in that R/3 System.
<u><b>SAP Locks</b></u>
To complement the SAP LUW concept, in which bundled database changes are made in a single database LUW, the R/3 System also contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks.
The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for an entire application object. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships.
Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary. A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock. When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_<lock object name> and DEQUEUE_<lock object name> . You can then set and release SAP locks in your ABAP program by calling these function modules in a CALL FUNCTION statement.
<u><b>Lock Types</b></u>
There are two types of lock in the R/3 System:
<u><b>
Shared lock</b></u>
Shared locks (or read locks) allow you to prevent data from being changed while you are reading it. They prevent other programs from setting an exclusive lock (write lock) to change the object. It does not, however, prevent other programs from setting further read locks.
<u><b>Exclusive lock</b></u>
Exclusive locks (or write locks) allow you to prevent data from being changed while you are changing it yourself. An exclusive lock, as its name suggests, locks an application object for exclusive use by the program that sets it. No other program can then set either a shared lock or an exclusive lock for the same application object.
example uses the lock object ESFLIGHT and its function modules ENQUEUE_ESFLIGHT and DEQUEUE_ESFLIGHT to lock and unlock the object.
For more information about creating lock objects and the corresponding function modules, refer to the Lock objects section of the ABAP Dictionary documentation.
The PAI processing for screen 100 in this transaction processes the user input and prepares for the requested action (Change or Display). If the user chooses Change, the program locks the relevant database object by calling the corresponding ENQUEUE function.
MODULE USER_COMMAND_0100 INPUT.
  CASE OK_CODE.
    WHEN 'SHOW'....
    WHEN 'CHNG'.
* <...Authority-check and other code...>
      CALL FUNCTION 'ENQUEUE_ESFLIGHT'
EXPORTING
MANDT = SY-MANDT
CARRID = SPFLI-CARRID
CONNID = SPFLI-CONNID
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID
TYPE 'E'
NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
The ENQUEUE function module can trigger the following exceptions:
FOREIGN_LOCK determines whether a conflicting lock already exists. The system variable SY-MSGV1 contains the name of the user that owns the lock.
The SYSTEM_FAILURE exception is triggered if the enqueue server is unable to set the lock for technical reasons.
At the end of a transaction, the locks are released automatically. However, there are exceptions if you have called update routines within the transaction. You can release a lock explicitly by calling the corresponding DEQUEUE module. As the programmer, you must decide for yourself the point at which it makes most sense to release the locks (for example, to make the data available to other transactions).
If you need to use the DEQUEUE function module call several times in a program, it makes good sense to write it in a subroutine, which you then call as required.
The subroutine UNLOCK_FLIGHT calls the DEQUEUE function module for the lock object ESFLIGHT:
FORM UNLOCK_FLIGHT.
     CALL FUNCTION 'DEQUEUE_ESFLIGHT'
          EXPORTING
              MANDT     = SY-MANDT
              CARRID    = SPFLI-CARRID
              CONNID    = SPFLI-CONNID
          EXCEPTIONS
              OTHERS    = 1.
     SET SCREEN 100.
ENDFORM.
You might use this for the BACK and EXIT functions in a PAI module for screen 200 in this example transaction. In the program, the system checks whether the user leaves the screen without having saved his or her changes. If so, the PROMPT_AND_SAVE routine sends a reminder, and gives the user the opportunity to save the changes. The flight can be unlocked by calling the UNLOCK_FLIGHT subroutine.
MODULE USER_COMMAND_0200 INPUT.
  CASE OK_CODE.
    WHEN 'SAVE'....
    WHEN 'EXIT'.
      CLEAR OK_CODE.
      IF OLD_SPFLI NE SPFLI.
         PERFORM PROMPT_AND_SAVE.
      ENDIF.
      PERFORM UNLOCK_FLIGHT.
      LEAVE TO SCREEN 0.
    WHEN 'BACK'....
<b>
Another Example</b> :
please see this link with Screen shot .....
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/frameset.htm
Reward all helpfull answers
Regards
Pavan

Similar Messages

  • Footer required only on last page of report -template uses @section context

    I have created a template that uses a tag - <?for-each@section:G_DELIVERY_ID?>. This is causing the Header and Footer to reset for each new Delivery ID. The template also has a last page only footer which I have added on the second page of template using <?start@last-page-first:body?> tag.
    When the XML data has two Delivery IDs with one page data for each. This gives a two page output as expected.
    The user requirement is that the last page only footer information in the template (on page 2) should be printed only on the last Delivery ID i.e. only once for the
    report, that too on the last page of last Delivery ID. Currently the footer is printed on both pages of the report i.e. for bothe Delivery IDs. How can I achieve this?

    Amit,
    Did you find a solution to this issue.
    Please advice what you have done to fix the issue.
    Padma.

  • How to get the only the last raw of the table

    Hello All,
    While fetching a table into internal table, how to get only the last record of the table.?
    Thanks and Regards, Pradeep

    I hope following code will solve your problem.
    DATA : it_bseg TYPE TABLE OF bseg,
           x_bseg TYPE bseg,
           v_index TYPE i.
    SELECT COUNT(*)
      FROM bseg
      INTO v_index.
    SELECT *
      FROM bseg
      INTO TABLE it_bseg.
    READ TABLE it_bseg INTO x_bseg INDEX V_INDEX.
    First SELECT will give you the number of rows in a table in v_index. Second SELECT will fetch all table data and then READ will give you the last record of the table in a structure x_bseg.
    Reward points if the answer is helpful.

  • How to get the address in last page in script?

    I have the requirement ....in 4 page script i want to print header logo in first page and in last 4 th page i want to print address....how is it possssible?

    use the command address ......end address.......
    The ADDRESS - ENDADDRESS control command formats an address according to the postal convention of the recipient country defined in the COUNTRY parameter. The reference fields are described in the structures ADRS1, ADRS2, or ADRS3, depending on the type of address. Either direct values or symbols may be assigned to the parameters
    The parameter values contain both formatting and address information. The address data are formatted for output according to the data in the following parameters:
    TYPE
    FROMCOUNTRY
    COUNTRY
    LANGUAGE
    PRIORITY
    DELIVERY
    LINES
    Parameters
    DELIVERY
    Means that the address should be formatted as a complete delivery address, using the street name and number rather than the P.O. Box.
    TYPE
    Specifies the type of address. The following types are possible:
    Normal address (ADRS1). This is the address of a company or organization. It corresponds to the address structure that is expected in most SAP applications.
    Private or personal address (ADRS2). This is the address of a natural person, a private or home address.
    Company addressDienstadresse (ADRS3) with contact person. This is the address of a colleague or contact within a company or organization. The company name should be specified in the TITLE and NAME fields; the ATTN: contact person should be named in PERSON and TITLE.
    Should you enter another address type or leave the field blank, then type 1 is used for formatting.
    PARAGRAPH
    Specifies the paragraph format to be used for outputting the address. If this parameter is not given, the address will be output using the default paragraph format.
    PRIORITY
    Specifies which of the address lines may be omitted should this be necessary. Any combination of the following codes may be specified. The order in which you list the codes determines the order in which address lines are left out.
    The codes are as follows:
    A Title
    P Mandatory empty line
    4 Name4
    3 Name3
    R Region
    T Neighborhood, administrative section of a city (CITY2)l
    D Department
    L Country name
    C Post code or zip code
    2 Name2
    B P.O. Box (Japan only)
    S Street name and number or P.O. Box, depending upon DELIVERY parameter
    N Name and form of address of natural person (PERSON and TITLE)
    I Location information in LOCATION
    O City
    LINES
    Specifies how many lines may be used for formatting the address. If there are too few lines available to allow all the address data to be formatted, then the data specified in the PRIORITY parameter are omitted. If there is no LINES parameter and if this command is in a form window of a type other than MAIN, then the number of lines available for formatting the address are automatically calculated based on the current output position and the size of the window.
    TITLE
    Title or form of address. Used only with addresses of types 1 and 3.
    NAME
    Up to four names may be given, separated by commas. Used only with addresses of types 1 and 3.
    PERSON
    Name of the addressee. Used only for addresses of type 2 (private or personal address) or type 3 (company contact address). In type 3 addresses, use PERSON for the name of your contact person: ‘Attn: Mr. Jeffries’. The name fields should be used for the company address.
    PERSONNUMBER
    Personal number. Can be used only for address types 2 or 3 (private or personal address).
    TITLE (with PERSON)
    Title of the addressee. Can be used only for address types 2 or type 3 (private or personal address).
    DEPARTMENT
    Department of the addressee. Can be used only for address type 3 (company address).
    STREET
    Street name.
    HOUSE
    House number for the corresponding street.
    LOCATION
    Additional location information, such as the building, "Upstairs Apartment" and so on. Appears on its own line in the address.
    POBOX
    P. O. Box
    CODE
    The post code / zip code of the P. O. Box if this differs from the post code / zip code of the recipient.
    CITY
    The city in which the destination P.O. Box is located if this differs from the city of the recipient.
    POSTCODE
    Post code / zip code of the recipient.
    CITY
    Addressee’s city. city1 is expected to be the city; city2 is the neighborhood or administrative section, if required.
    NO_UPPERCASE_FOR_CITY
    Default = NO_UPPERCASE_FOR_CITY ‘ ‘
    Usually, the system prints the city and country names of foreign addresses in uppercase ( NO_UPPERCASE_FOR_CITY ‘ ‘ ).
    You can use this parameter to force the system to output city and country name unchanged (uppercase/lowercase).
    ( NO_UPPERCASE_FOR_CITY ‘X’ )
    REGION
    This allows an administrative region, county, province, or state etc. to be specified.
    COUNTRY
    Specifies the recipient country, i.e. the country according to whose postal conventions the address is to be formatted.
    COUNTRY_IN_REC_LANG
    This flag tells the system to use the recipient language for the country name.
    ( COUNTRY_IN_REC_LANG ‘X‘ )
    ( Default: Recipient language is not used: COUNTRY_IN_REC_LANG ‘ ‘ )
    LANG_FOR_COUNTRY
    Default = Space
    Use this parameter to explicitly set the language in which to print the country name of a foreign address. By default, the system uses the language of the sending country.
    LANGUAGE
    Language code of the language of the recipient country, if it differs from that of the recipient COUNTRY. Example: addresses in Switzerland. Standard SAP language codes are used; you can display these in the initial SAPscript text processing screen or in table T002.
    FROMCOUNTRY
    Specifies the language to be used for formatting the name of the recipient country. For most European countries, the recipient country is specified by placing the international car registration letters in front of the post code and separating them from the post code with a hyphen. You must always specify the sender country.
    ADDRESSNUMBER
    The number is used to index a central address file, from which the desired address is read instead of using the set of the above fields. You can find more information on this facility in the documentation for the function module ADDRESS_INTO_PRINTFORM.
    You use this one parameter instead of the set of parameters described before.
    /: ADDRESS
    /: TITLE 'Firma'
    /: NAME 'Schneider & Co', 'Finanzberatung'
    /: STREET 'Kapitalgasse 33'
    /: POBOX '12345' CODE '68499'
    /: POSTCODE '68309'
    /: CITY 'Mannheim'
    /: COUNTRY 'DE'
    /: FROMCOUNTRY 'DE'
    /: ENDADDRESS
    This produces the following output address:
    Firma
    Schneider & Co
    Finanzberatung
    Postfach 12345
    68499 Mannheim
    If the DELIVERY parameter is specified on the ADDRESS command, then the street name and number will appear in the address in place of the P. O. Box number.
    Firma
    Schneider & Co
    Finanzberatung
    Kapitalgasse 33
    68309 Mannheim
    SAPscript makes an internal call to the ADDRESS_INTO_PRINTFORM function module for formatting the address. If the result is not as expected, you should check the settings for this function module
    If DELIVERY is not specified and if a POBOX is specified, then the POBOX is used in an address instead of a STREET.
    reward points if helpful....
    Message was edited by:
            raam

  • Avoid printing Header and Footer in the last page

    Hi,
    Could anyone please let me know how to avoid print the header and footer in the last page?
    Note: I'm printing RTF template for publishing the output.
    Looking forward for your valuable inputs/suggestions.
    Thanks in advance,
    Regards,
    Muru

    Hai,
    My report got FROM PO & TO PO parameters and i need to print footer only in first page of each PO. Tried with section but now i am getting first page of all PO contionious and then all lines together.
    Please call me or sent replies to [email protected]

  • Displaying Footer on the Last Page of the report

    Hi Experts,
    We have a requirement to display footer on the last page of the report only.
    Could you please guide how to acheive this.
    Thanks in Advance,
    Cheers,
    Andy.

    Pls see this Blog.It may help you
    http://blogs.oracle.com/xmlpublisher/2007/03/30/
    Thx
    Rahul

  • How to get attribute value from standard page ?

    Hi,
    How to get attribute value from standard page ?
    String str = (String)vo.getCurrentRow().getAttrbute("RunId");
    But this value is returning a null value ....
    Can anyone help me to get this attribute value which is actually having a actual value .

    getCurrentRow() would always return null if no setCurrentRow() is used.
    Please check the page design and understand how many rows of VO are there. You can also use the following to get the row:
    vo.reset();
    vo.next();
    Regards
    Sumit

  • Need to print some text only in last page in SAP script

    Moved to correct forum by Moderator.  General wasn't right either.
    Hi All.
    I need to print "Remarks" only in last page of sap script.
    Can anyone please help me on this.
    Thanks
    Senthil kumar V.
    Edited by: Matt on Nov 21, 2008 7:38 AM

    Hi,
    you have 4 possibilities.2 at non main window, 2 at main window.
    at non main window.
    1. /: IF &PAGE(C)& = &SAPSCRIPT-FORMPAGES(C)&
    remarks
    remarks
    remarks
       /: ENDIF
    2, /: if &NEXTPAGE& ='0'.
    remarks
    remarks
    remarks
       /: ENDIF
    at main window
    3. Add the remarks at the last item of the main which is printed
    4. add a new item to your main (/E)
        put your remarks in it.
       Change your program in such a way this item will print as last one.
       like
        /E REMARKS
    remarks
    remarks
    remarks
       and in sapscript program add logic at the end.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'REMARKS'
    EXCEPTIONS
    element = 1
    window = 2.
    I am sure this will do. Make a choice.
    Gr., Frank

  • How to get rid of the Login page in Portal?

    Hi Guys,
    I have a newly developed intranet portal project for my company which does not need login no more. I hope you can help me how to get rid of the login page in portal which is I know in every application you create, there should be a login. Is this possible that I can just simply type in to the URL address bar my application then it will no longer ask for any logins? Please help! Many thanks!
    Russel

    Hi Russel,
    You can give public access to pages, applications etc. Users won't need to supply a username/password then, while you still can hide some of the pages to authorized people.
    Check the access tab for pages and the manage tab for applications.

  • How to get the only the changed or newly added entries in AFTER SAVE.

    I have created table maintenance generated for a table,I want to get the newly added or changed entries while saving thats why im using AFTER SAVE event for the same,can anyone please tell me how to get the only the changed or newly added entries in AFTER SAVE.

    Hi,
    Welcome you post on the forum.
    I have moved your thread here because it is in English and should not in the language specific forum. What is your system version?
    Thanks,
    Gordon

  • When using reader, the font gets very large on last page and I cant change it

    when using reader, the font gets very large on last page and I cant change it

    You cannot edit PDF files with Reader. You can change the View options to make what you see smaller. View -> Zoom

  • How to get current month and last month dynamically??

    how to get current month and last month dynamically
    like
    month = getCurrentMonth();
    lastmonth = getcurrentMonth() -1;
    please help
    thanks

    hi :-)
    /* depracated but can be still useful */
    java.util.Date dtCurrent = new java.util.Date();
    int month = dtCurrent.getMonth();
    int lastmonth = dtCurrent.getMonth() - 1;
    System.out.println("* " + month);
    System.out.println("* " + lastmonth);
    /* better to use this one */
    Calendar cal = new GregorianCalendar();     
    int imonth = cal.get(Calendar.MONTH);
    int ilastmonth = cal.get(Calendar.MONTH) - 1;
    System.out.println("*** " + imonth);
    System.out.println("*** " + ilastmonth);
    regards,

  • How to get data on the next page in case of templates if data is more ?

    please tell me how to get data on the next page while i m using template in my first page , if data is more howw it can be displayed on the next page ?

    HI Asim,
    template is fixed we  it can't be expand . u can better to use table line it can automaticlly expending if data is more ... u can create one more page like page 2 and create a window for entire second page ..then assign it in first page (next page page2).
    regards
    kiran kumar.

  • I accidently lost my ipad's photos when i got the new OS. How to get them back? last backup contained my photos

    i accidently lost my ipad's photos when i got the new OS. How to get them back? (last backup contained my photos)

    I just restaured backup and bingo!! all my photos came back

  • How to get relationship between two  views in the  reports

    How to get relationship between two  views in the  reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports

    Hi,
    Please explain your question in detail...what do you want to read ?
    If you want to know about the navigation links between the views then you can use APIs  like
    wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
    Iterate through the navigationLinkInfo from above collection and can read the other properties .
    I haven't tried the above , but it should work !!!
    Regards,Anilkumar

Maybe you are looking for

  • Performance reduced after EFI update on Macbook Pro Retina

    after i upgraded EFI on my retina macbook pro the proformence reduced to unusable. under heavy load( under mac os or windows7) the cpu clock drops and as well as cpu clock. this is the screen shot of gpu clock monitoring from windows u can see the gp

  • Calendar list of events

    Upgraded to iOS7.1.  Can only see 1 calendar event at a time even under a single day.  How do you (or even can you) change to list ALL events? I always used the list of events for ease in scheduling something.  Relied on this part of the phone/calend

  • AA634 : Write up of current year's depreciation

    Hi, I believe we cannot write up current year dep but only of the previous fiscal year. Is there any way to write up for current year's depreciation? I cannot post a negative amount in uplanned depreciation. If I enter the amount of the curreny year

  • Error in implementing stylesheets

    Hi, I created and activated a stylesheet using the tcode "smartstyles" I then went to the survey cockpit (tcode "survey") and created a new survey. I then created a questionnnaire using "create questionnaire". In the creation of a questionnaire; I am

  • In wich order do I have to start the windows services for 10g?

    Hello, can anybody tell me in wich order I have to start the services for oracle under windows? OracleDBConsole<sid> OracleOraDb10g_home1TNSListner OracleService<sid> OracleJobScheduler<sid> ... seems like I don't need this service at all - now all s