Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

abap

Former Member
0 Kudos

1.what is the diff between guiupload,ws_upload,upload?

2.H to write the total and sub total in alv and script?

3.In functionmodule is to possible call subroutine?

4.In start-of-seletion is it possible to define message (like error,wrning)

5.How to define line type in smartforms?

6.In our requirement is sales no is 1,2,3 and delivery no is 4,5,6 how to write the select query?

7.How to explain report object(like sales order,purchase order)please explain?

8Have u faced any critical Bug?What is the bug?what is the functional requirement?Please explain?

9In script i will add a field where i will add a field in script or driver pgm or both?

10.How to write the sales index in BDC?

1 REPLY 1

Former Member
0 Kudos

HI

<b>1.what is the diff between guiupload,ws_upload,upload?</b>

Files on the Presentation Server

WS_UPLOAD and WS_DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. WS_UPLOAD and WS_DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.

The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.

Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.

<b>2.H to write the total and sub total in alv and script?</b>

<b>ALV</b>

Just follow these simple steps.

1. Define SORT table and FIELDCATALOG table .

DATA IT_FCAT TYPE slis_T_fieldcat_alv.

DATA WA_FCAT LIKE LINE OF IT_FCAT.

DATA IT_SORT TYPE SLIS_T_SORTINFO_ALV.

DATA WA_SORT LIKE LINE OF IT_SORT.

"Others data

DATA I_REPID LIKE SY-REPID.

2. Create Grand Total.

While creating fieldcatalog, we have to set DO_SUM = 'X' for quantity field .

clear WA_FCAT.

WA_FCAT-fieldname = 'ANZHL'. " Your Quantity Field

WA_FCAT-tabname = 'IT_CUTI'. " Your Internal Table

WA_FCAT-DO_SUM = 'X'.

append WA_FCAT TO IT_FCAT.

3. Create Subtotal

Whenever BEGDA [Start Date] is changed Subtotal is displayed ( Set Subtot = 'X' ) .

Build our sort table .

Clear: WA_SORT.

WA_SORT-spos = 1.

WA_SORT-fieldname = 'BEGDA'. "

WA_SORT-up = 'X'.

WA_SORT-subtot = 'X'.

append WA_SORT TO IT_SORT.

4.Pass this IT_SORT table thrugh REUSE_ALV_LIST_DISPLAY function module.

I_REPID = SY-REPID.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = I_REPID

I_INTERNAL_TABNAME = 'IT_CUTI' "capital letters = Your Internal Table

I_INCLNAME = I_REPID

CHANGING

CT_FIELDCAT = IT_FCAT

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = I_REPID

IT_FIELDCAT = IT_FCAT

I_SAVE = 'A'

IT_SORT = IT_SORT

TABLES

T_OUTTAB = IT_CUTI " Your Internal Table

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

<b>script</b>

http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-sub...

<b>3.In functionmodule is to possible call subroutine?</b>

yes you can use

<b>4.In start-of-seletion is it possible to define message (like error,wrning)</b>

Yes you write the error messages and warning messages in START-OF-SELECTION

<b>5.How to define line type in smartforms?</b>

The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.

Line type

For the line type <linetype>, you can specify:

Any data type if you are using the TYPE addition. This can be a predefined ABAP type, a local type in the program, or a data type from the ABAP Dictionary.

If you specify any of the generic elementary types C, N, P, or X, any attributes that you fail to specify (field length, number of decimal places) are automatically filled with the default values. You cannot specify any other generic types.

Any data object recognized within the program at that point if you are using the LIKE addition. The line type adopts the fully-specified data type of the data object to which you refer. Except for within classes, you can still use the LIKE addition to refer to database tables and structures in the ABAP Dictionary (for compatibility reasons).

All of the lines in the internal table have the fully-specified technical attributes of the specified data type.

WE USE LINE TYPE TO RETRIEVE FIELDS FROM YOUR WORK AREA OR INTERNAL TABLE BASED ON YOUR REQUIREMENT ( THAT HOW YOU USED IN YOUR SMART FORMS ).