Hai all

can anybody tell me why we cannot run ALV GRID display
in background.
What will happen if i do this.
how can we do in background

Hi,
see this
Many a times there is a requirement to display ALV Grid (not ALV List) in the background Job. I have checked the SDN Forum for the same and it has been mentioned that ALV Grid cannot be displayed in Background, but the list output of ALV is possible. So user won’t have the actual Grid interface but the List interface.
There is a workaround to display ALV Grid in Background Job. The only restriction is you can’t schedule the job through SM36. You need to execute the transaction of the report program, fill in the selection screen data and hit Execute.
The job would be executed in background. User will be able to see the Job Log and Job Status after executing the program. User doesn’t have to go to SM37 to view the job status/log. Once the Job Status is changed to “COMPLETED”, user can click on “DISPLAY SPOOL” to view the ALV Grid.
Limitations:
Can’t schedulea background job
The session should be active until the background job is completed. If the session is closed, then user won’t be able to check the output in ALV Grid. User would be able to check the output through spool or SM37
Advantages:
If the spool width is greater than 255 characters, then the entire width could be seen in the output because the output is directed to an ALV Grid and not to spool
Interface of ALV Grid is available instead of ALV List even though it’s a background job.
Program won’t give the TIME OUT error
Steps Required:
1. Once you execute the program, the following screen would be displayed
2. Click “Display Job Status” to check the Status of the Background Job
3. Click on “Display the Job Log” to check the Log
4. Click on “Display Job Status” to check the Job Status
5. Click on “DISPLAY SPOOL” to check the spool content once the Job Status is changed to “COMPLETED”. Output is displayed in ALV Grid
Programs:
1. Two different programs needs to be created
ZPROGRAM_ONE: This is the 1st program, where the selection screen and all the data validations would be done. Error handling for invalid data should be done in this program.
Once the data validation is done, this program would call the 2nd program ZPROGEAM_TWO. Build the logic to display ALV Grid in this program. The logic will only display ALV in foreground and it won’t be reflected in the spool.
ZPROGRAM_TWO: This program would fetch all the data and do all the processing. If you want the spool output along with ALV Grid output, then build the logic in this program to display ALV Grid.
*& Report ZPROGRAM_ONE *
REPORT zprogram_one .
PRASHANT PATIL
TABLES : mara,
tsp01.
type-pools:slis.
TYPES : BEGIN OF t_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
END OF t_mara.
DATA : i_mara TYPE STANDARD TABLE OF t_mara,
wa_mara TYPE t_mara,
wa_index TYPE indx, " For Index details
wa_index_key TYPE indx-srtfd VALUE 'PRG_ONE',
i_jobsteplist TYPE STANDARD TABLE OF tbtcstep, " For spool number
wa_params TYPE pri_params, " To Get Print Parameters
wa_jobhead TYPE tbtcjob, " To know the status of job
wa_jobsteplist TYPE tbtcstep, " To know the spool
w_jobname TYPE tbtco-jobname, " Job name for bckgrnd job
w_jobcount TYPE tbtco-jobcount, " Unique id for bckgrd job
w_path TYPE string, " Upload path
w_lsind TYPE sy-lsind, " Index
wa_seltab TYPE rsparams,
i_seltab TYPE STANDARD TABLE OF rsparams,
wa_index1 TYPE indx, " For Index details
wa_index_key1 TYPE indx-srtfd VALUE 'PRG_TWO',
i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF i_fieldcat.
CONSTANTS DECLARATION *
CONSTANTS :
c_a(1) TYPE c VALUE 'A',
c_m(1) TYPE c VALUE 'M',
c_l(1) TYPE c VALUE 'L',
c_c(1) TYPE c VALUE 'C',
c_zfdr(4) TYPE c VALUE 'ZFDR',
c_x(1) TYPE c VALUE 'X',
c_locl(4) TYPE c VALUE 'LOCL', " Destination is LOCAL
c_f(1) TYPE c VALUE 'F', " Job Status - Failed
c_s(1) TYPE c VALUE 'S',
c_p(1) TYPE c VALUE 'P'.
SELECTION SCREEN PARAMETERS
SELECT-OPTIONS : s_matnr FOR mara-matnr.
START-OF-SELECTION.
Before the export, fill the data fields before CLUSTR
wa_index-aedat = sy-datum.
wa_index-usera = sy-uname.
EXPORT s_matnr
TO DATABASE indx(st) FROM wa_index ID wa_index_key.
To Open the Job for background processing
PERFORM open_job.
To get the print parameters
PERFORM get_print_parameters.
Submit the job in background
PERFORM job_submit.
Close the background job
PERFORM job_close.
This is the output screen with the buttons ********
Create 3 buttons DISPLAY SPOOL, STATUS, JOBLOG
SET PF-STATUS 'ZS001'.
WRITE: / 'The program is submitted in Background'.
WRITE: / 'Press DISPLAY SPOOL to see the spool'.
WRITE: / 'Press STATUS to see the status of the background'.
AT USER-COMMAND.
If user presses the 'BACK' button
IF sy-ucomm = 'BAK'.
IF wa_jobhead-status = c_f OR
wa_jobhead-status = c_a.
LEAVE TO SCREEN 0.
ENDIF.
ENDIF.
If the user presses the 'DISPLAY SPOOL' Button
IF sy-ucomm = 'DISPLAY'.
PERFORM display_spool.
ENDIF.
If the user presses the 'JOB STATUS' Button
IF sy-ucomm = 'STATUS'.
PERFORM display_status.
ENDIF.
If the user presses the 'JOB LOG' Button
IF sy-ucomm = 'JOBLOG'.
PERFORM display_job_log.
ENDIF.
*& Form open_job
text
--> p1 text
<-- p2 text
FORM open_job .
This is to Create a new job which is to be submitted in background to
process sales order/delivery/invoice
Here we would get a unique id ( Jobcount ) which identifies our job
along with the job name which we have assigned to our job
CONCATENATE sy-uname
sy-datum
sy-uzeit
INTO w_jobname . " Assign unique jobname
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
jobname = w_jobname
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
jobcount = w_jobcount
CHANGING
RET =
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " open_job
*& Form get_print_parameters
text
--> p1 text
<-- p2 text
FORM get_print_parameters .
DATA : l_valid TYPE c.
This is to get the Print Parameters for the job which is to be
submitted in background to process sales order/delivery/invoice
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_ID = C_CHAR_UNKNOWN
ARCHIVE_INFO = C_CHAR_UNKNOWN
ARCHIVE_MODE = C_CHAR_UNKNOWN
ARCHIVE_TEXT = C_CHAR_UNKNOWN
AR_OBJECT = C_CHAR_UNKNOWN
ARCHIVE_REPORT = C_CHAR_UNKNOWN
AUTHORITY = C_CHAR_UNKNOWN
COPIES = C_NUM3_UNKNOWN
COVER_PAGE = C_CHAR_UNKNOWN
DATA_SET = C_CHAR_UNKNOWN
DEPARTMENT = C_CHAR_UNKNOWN
destination = c_locl " LOCL
EXPIRATION = C_NUM1_UNKNOWN
immediately = space
IN_ARCHIVE_PARAMETERS = ' '
IN_PARAMETERS = ' '
LAYOUT = C_CHAR_UNKNOWN
LINE_COUNT = C_INT_UNKNOWN
LINE_SIZE = C_INT_UNKNOWN
LIST_NAME = C_CHAR_UNKNOWN
LIST_TEXT = C_CHAR_UNKNOWN
MODE = ' '
new_list_id = c_x
PROTECT_LIST = C_CHAR_UNKNOWN
no_dialog = c_x
RECEIVER = C_CHAR_UNKNOWN
RELEASE = C_CHAR_UNKNOWN
REPORT = C_CHAR_UNKNOWN
SAP_COVER_PAGE = C_CHAR_UNKNOWN
HOST_COVER_PAGE = C_CHAR_UNKNOWN
PRIORITY = C_NUM1_UNKNOWN
SAP_OBJECT = C_CHAR_UNKNOWN
TYPE = C_CHAR_UNKNOWN
user = sy-uname
USE_OLD_LAYOUT = ' '
UC_DISPLAY_MODE = C_CHAR_UNKNOWN
DRAFT = C_CHAR_UNKNOWN
ABAP_LIST = ' '
USE_ARCHIVENAME_DEF = ' '
DEFAULT_SPOOL_SIZE = C_CHAR_UNKNOWN
PO_FAX_STORE = ' '
NO_FRAMES = C_CHAR_UNKNOWN
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = wa_params
valid = l_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " get_print_parameters
*& Form job_submit
text
--> p1 text
<-- p2 text
FORM job_submit .
The job which we have created & the unique id ( jobcount ) which we
have got identifies our job. Hence those parameters are passed along
with the name of the background program "ZPROGRAM_TWO"
The job is submitted in background.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = sy-uname
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = w_jobcount
jobname = w_jobname
LANGUAGE = SY-LANGU
priparams = wa_params
report = 'ZPROGRAM_TWO'
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " job_submit
*& Form job_close
text
--> p1 text
<-- p2 text
FORM job_close .
Once the job is submitted in background then the job is closed
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
jobcount = w_jobcount
jobname = w_jobname
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
strtimmed = c_x
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " job_close
*& Form display_spool
text
--> p1 text
<-- p2 text
FORM display_spool .
To Read the Job to get the spool details
DATA : l_rqident TYPE tsp01-rqident, " Spool Number
l_spoolno TYPE tsp01_sp0r-rqid_char.
CLEAR : l_rqident,
w_lsind,
wa_jobsteplist.
REFRESH : i_jobsteplist.
SET PF-STATUS 'ZAR02'.
Get the Spool Number
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Read the Job Step list to get the spool number
READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.
CHECK wa_jobsteplist-listident <> space.
Spool Number
l_rqident = wa_jobsteplist-listident.
MOVE l_rqident TO l_spoolno.
Check the spool in TSP01
SELECT SINGLE * FROM tsp01 WHERE rqident = l_rqident.
IF sy-subrc = 0.
LEAVE TO LIST-PROCESSING.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = l_spoolno
IMPORTING
RC =
STATUS =
PERFORM show_alv.
ENDIF.
w_lsind = sy-lsind.
IF sy-lsind GE 19.
sy-lsind = 1.
ENDIF.
ENDFORM. " display_spool
*& Form show_alv
text
--> p1 text
<-- p2 text
FORM show_alv .
Before the import, fill the data fields before CLUSTR.
wa_index1-aedat = sy-datum.
wa_index1-usera = sy-uname.
To Import the selection screen data from Calling Program
IMPORT i_mara
FROM DATABASE indx(st) ID wa_index_key1 TO wa_index1.
FREE MEMORY ID wa_index_key1.
This prepares the field-catalog for ALV.
PERFORM prepare_fieldcatalog.
This displays the output in ALV format .
PERFORM display_alv.
ENDFORM. " show_alv
*& Form display_status
text
--> p1 text
<-- p2 text
FORM display_status .
To Display the STATUS of the JOB which is exectued in background
CLEAR : wa_jobsteplist.
REFRESH : i_jobsteplist.
WRITE:/ 'DISPLAYING JOB STATUS'.
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
To Display the status text as per the status type
CASE wa_jobhead-status.
WHEN 'S'. WRITE: / 'Scheduled'.
WHEN 'R'. WRITE: / 'Released'.
WHEN 'F'. WRITE: / 'Completed'.
WHEN 'A'. WRITE: / 'Cancelled'.
WHEN OTHERS.
ENDCASE.
IF sy-lsind GE 19.
sy-lsind = 1.
ENDIF.
ENDFORM. " display_status
*& Form display_job_log
text
--> p1 text
<-- p2 text
FORM display_job_log .
To display the log of the background program
LEAVE TO LIST-PROCESSING.
CALL FUNCTION 'BP_JOBLOG_SHOW_SM37B'
EXPORTING
client = sy-mandt
jobcount = w_jobcount
joblogid = ' '
jobname = w_jobname
EXCEPTIONS
error_reading_jobdata = 1
error_reading_joblog_data = 2
jobcount_missing = 3
joblog_does_not_exist = 4
joblog_is_empty = 5
joblog_show_canceled = 6
jobname_missing = 7
job_does_not_exist = 8
no_joblog_there_yet = 9
no_show_privilege_given = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_job_log
*& Form prepare_fieldcatalog
text
--> p1 text
<-- p2 text
FORM prepare_fieldcatalog .
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = 'Material no.'.
wa_fieldcat-outputlen = '18'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERSDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = 'Creation date'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERNAM'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = 'Name of Person'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LAEDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = ' Last Change'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
ENDFORM. " prepare_fieldcatalog
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = i_fieldcat
tables
t_outtab = i_mara.
ENDFORM. " display_alv
• ZPROGRAM_TWO: This is the 2nd program which would be called from program ZPROGRAM_ONE.
*& Report ZPROGRAM_TWO *
REPORT zprogram_two .
PRASHANT PATIL
TABLES : mara.
TYPE-POOLS:slis.
TYPES : BEGIN OF t_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
END OF t_mara.
DATA : i_mara TYPE STANDARD TABLE OF t_mara,
wa_mara TYPE t_mara,
wa_index TYPE indx, " For Index details
wa_index_key TYPE indx-srtfd VALUE 'PRG_ONE',
wa_index1 TYPE indx, " For Index details
wa_index_key1 TYPE indx-srtfd VALUE 'PRG_TWO',
i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF i_fieldcat.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
Before the import, fill the data fields before CLUSTR.
wa_index-aedat = sy-datum.
wa_index-usera = sy-uname.
To Import the selection screen data from Calling Program
IMPORT s_matnr
FROM DATABASE indx(st) ID wa_index_key TO wa_index.
FREE MEMORY ID wa_index_key.
SELECT matnr
ersda
ernam
laeda
FROM mara
INTO TABLE i_mara
WHERE matnr IN s_matnr.
PERFORM prepare_fieldcatalog.
PERFORM display_alv.
Before the export, fill the data fields before CLUSTR
wa_index1-aedat = sy-datum.
wa_index1-usera = sy-uname.
EXPORT i_mara
TO DATABASE indx(st) FROM wa_index1 ID wa_index_key1.
*& Form prepare_fieldcatalog
text
--> p1 text
<-- p2 text
FORM prepare_fieldcatalog .
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '18'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERSDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERNAM'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LAEDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
ENDFORM. " prepare_fieldcatalog
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_mara.
ENDFORM. " display_alv
its possible to display ALV Grid using OO ALV. Following code can be used instead of FM.
In the PBO, add following code
SET PF-STATUS 'ZSTAT'.
If program is executed in background
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING
e_offline = off.
IF off IS INITIAL.
IF container1 IS INITIAL.
CREATE OBJECT container1
EXPORTING
container_name = 'CC_ALV1' .
ENDIF.
ENDIF.
CREATE OBJECT g_grid1
EXPORTING
i_parent = container1.
CALL METHOD g_grid1->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
i_save = 'A'
i_default = ' '
is_layout =
is_print =
IT_SPECIAL_GROUPS =
it_toolbar_excluding =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = i_output
it_fieldcatalog = i_fieldcatalog
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Padmam.

Similar Messages

  • Hai all sales order  discription and quantity should not allow modification

    Hi all
    any one plz respond me, my requirement is once the sales order approved then its not allow any modification  like order quantity, discreption and first delivery date in the change mode va02 and va22 plz help me .
    regards,
    venkat.

    You can use user exit   MV45AFZZ and here
    FORM USEREXIT_FIELD_MODIFICATION.
    CASE SCREEN-GROUP3.
      WHEN '900'.
        IF VBAK-VBTYP NE 'A'.
          SCREEN-ACTIVE = 0.
        ENDIF.
    ENDCASE.
    CASE SCREEN-NAME.
      WHEN 'VBAK-VBELN'.
        SCREEN-ACTIVE = 0.
    ENDCASE.
    ENDFORM.
    Write your code between Form and endform.
    try to mention sy-tcode is VA02.
    then it won't distrb others.
    Reward Points if it is helpful
    Thanks
    Seshu

  • Hai all regarding VBAP-ARKTX field updation

    Hai experts,
    my problem is vbap-arktx is not updating in the sales order creation, i am using exit save_document.my requirement is i want to concatenate description and model no in the characteristic assignment screen into one local variable and it move to VBAP-ARKTX. i had concatenated the description and model no in to one variable and it is moving fine in the xvbap-arktx but when i am saving the document its not updating in vbap-arktx. is it ok for using commit work or update statement or anything plz suggest me .
    regards,
    venkat.

    hai heliman,
    thanks for ur reply.
    i had traied fro move field _vbap its not triggering in VA01 creation time, its triggaring only when VA02 change mode.i am using this FM to get the duiscription and model no  
    CALL FUNCTION 'VC_I_GET_CONFIGURATION'
    i am using this code to read and concatenate these fields in to lv_arktx and moving to xvbap-arktx fine but my problem is once i am saving that order its not reflecting to the vbap-arktx field give me some suggesions to me.
      CLEAR gw_conf_out.
      READ TABLE gi_conf_out INTO gw_conf_out WITH KEY atwrt = '          DESCRIPTION'.
      lv_zdescription = gw_conf_out-atbez.
      CLEAR gw_conf_out.
      READ TABLE gi_conf_out INTO gw_conf_out WITH KEY atwrt = '          MODEL/STYLE NUMBER'.
      lv_model_style_number = gw_conf_out-atbez.
      CONCATENATE lv_zvendor lv_zdescription lv_model_style_number  INTO lv_arktx
         SEPARATED BY space.
      MOVE lv_arktx TO xvbap-arktx.
         xvbap-arktx = lv_arktx.
      CLEAR lv_arktx.
      CLEAR gi_conf_out.
    ENDLOOP.
    regards,
    venkat.

  • Hai all-help needed urgently

    how do i get the list of table names present in a Ms Access database using
    DatabaseMetaData?Can any one help me in this regard,
    Thanks in advance..

    try {
            // Gets the database metadata
            DatabaseMetaData dbmd = connection.getMetaData();
            // Specify the type of object; in this case we want tables
            String[] types = {"TABLE"};
            ResultSet resultSet = dbmd.getTables(null, null, "%", types);
            // Get the table names
            while (resultSet.next()) {
                // Get the table name
                String tableName = resultSet.getString(3);
                // Get the table's catalog and schema names (if any)
                String tableCatalog = resultSet.getString(1);
                String tableSchema = resultSet.getString(2);
        } catch (SQLException e) {
        }

  • Retrieving all open Sales Orders

    Hai All,
    Can any one inform me how to get all the open sales orders?
    is there any fuction module exits for this?
    if not if any one knows the logic for this?
    Thanks & Regards,
    Bhaskar

    Hi Bhaskar,
    check this link for sample code.
    Re: Open Orders Report.
    Regards,
    Kiran Sure

  • How to get all menu items list in blackberry curve phone

    Hai all
    i am new to Blackberry application developer. I done one application in blackberry in default simulaor, I changed my simulator to Blackberry 8900 simulator. The features is more in curve phones like instant messaging. So i need to get the full menu item list from the API. Do i neddd to change the API ?..  I wanted to get the list like .. camera,maps,contacts,messages,weblin,sms,instant messaging etc. Can anyone help me in this case. My intention to get all the menu items in a list.
    Thanks in Advance

    thank you for your solution.. my aim is list all the menu items in a drop down list. In the default simulator it is fetching all the menu items in the phone through API. But in curve 8900 it is not showing all the menu items, can u give me a suggestion
    like           ^
    camera
    contacts
    maps
    clock
    calendar  like this i need to display
    Message Edited by joedfranc on 05-30-2009 10:57 AM

  • Converter for converting all HTML tags to JSF tags

    hai all,
    i am new to JSF. i need a suggestions to convert all my HTML pages to JSF pages bcoz i was already created more pages in HTML and now i want to convert all the pages to JSF. can u give any suggestion plz post it here or send me a mail to [email protected]
    thanks in advance,
    regards,
    V.Sabarish

    hi roman,
    thanks for ur reply. it converts the file but the links r not converting....so can u suggest me another way for converting a HTML tags to JSF tags.

  • Hai ,problem with packages

    Hai all,
    i got a problem with user defined packages .i have one class under one package "sg.km" n the class name is kmc.class n i want to use that sg.km.kmc in some another class that is also a part of sg.km package .i hope i'll get reponses to my prob asap.
    thanks in advance
    yours
    srinu kumar reddy

    You should not need to import a class that is in the same package.
    You did not post enough information for me to give you a good answer. You should always post an error message along with any command you entered. All you said was, "i got a problem." We don't know if your problem is with compiling, running, jar file, applet, etc.
    You need to have a directory structure that matches your package. The kmc.class file a sg\km directory path. For example, c:\myjava\classes\sg\km\kmc.class. Then you need c:\myjava\classes directory in your Classpath both for compiling and running.

  • Query not working for all the material, may be space problem, need help.

    Hai all,
      I have a query with  variable material and date range. we have 60,000 materials.
    I am doing the report for the month of feb, year 2007.
        When I am executing up to 30,000 material the report is generated, anything beyond 30,000 materials the query is abending with the following message.
    00010004 AFunction aborted 
    SR 044 TSV_TNEW_PAGE_ALLOC_FAILED     
    00010004 ASystem error in program SAPLRSDRC and form TSV_TNEW_PAGE_ALLOC_FAILED ,
    BRAIN 299SAPLRSDRC TSV_TNEW_PAGE_ALLOC_FAILED
    any help in this regard is very much appreciated.
      I am thinking it is a problem with space.But not sure what space it is called?! The basis team saw the temp db and found they have lot of space.
    Thanks, Vijay.

    This tells there is not enough main memory (not disk space) for the program to run.
    - You can look the dump in ST22, it will have suggestions on increasing the ROLLAREA??, you can forward that to Basis.
    - Most likely you will not have any more memory to assign so the above may not be feasible. Try to rework your query so it works with less data.

  • ALV GRID-how to select all the check boxes using push button

    Hai All,
    I displayed ALV grid & every record contains one check box as first column.
    If user clicks on one push button all the check boxes needs to selected.
    Could any one tell me how to do this?
    Regards,
    Bhaskar

    Hi Bhaskar,
       Try this code :
    *" Table declarations...................................................
    TABLES :
      spfli.                              " Flight Schedule
    *" Data declarations...................................................
    Work variables                                                      *
    DATA :
      w_checkbox  TYPE c,                  " Check Box
      w_checkbox1 TYPE c,                  " Check Box
      w_lineno    LIKE sy-lilli,           " Current Line No
      w_lines     TYPE i.                  " No. Of Records in Int.Table
    Internal table to hold Flight Schedule data                         *
    DATA :
       t_spfli LIKE
      STANDARD TABLE
            OF spfli.
    Structure to hold Function Codes                                    *
    DATA :
      fs_fcode LIKE LINE OF t_fcode.
                          TOP-OF-PAGE EVENT                             *
    TOP-OF-PAGE.
      PERFORM top_of_page.
                       START-OF-SELECTION EVENT                         *
    START-OF-SELECTION.
      PERFORM fetch_spfli_data.
      SET PF-STATUS 'YMENU1'.
      DESCRIBE TABLE t_spfli LINES w_lines.
      fs_fcode = 'EXIT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'SELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'DESELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'RETRIEVE'.
      APPEND fs_fcode TO t_fcode.
                        AT USER-COMMAND EVENT                           *
    AT USER-COMMAND.
      PERFORM user_command.
    FORM top_of_page .
      WRITE :/50 'Flight Schedule Information'(008).
      ULINE.
      FORMAT COLOR 1.
      WRITE :/10 'Carrier ID'(001),
              25 'Connection ID'(002) ,
              43 'Airport From'(003),
              59 'Airport To'(004),
              74 'Departure Time'(007),
              93 'Arrival Time'(011),
             106 space.
    ENDFORM.                               " FORM TOP_OF_PAGE
    FORM fetch_spfli_data .
      SELECT carrid                        " Carrier ID
             connid                        " Connection ID
             airpfrom                      " Airport From
             airpto                        " Airport To
             deptime                       " Departure Time
             arrtime                       " Arrival Time
        FROM spfli
        INTO CORRESPONDING FIELDS OF
       TABLE t_spfli.
      IF sy-subrc EQ 0.
        PERFORM display_spfli_data.
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " FORM FETCH_SPFLI_DATA
    FORM display_spfli_data .
      SORT t_spfli BY carrid ASCENDING.
      LOOP AT t_spfli INTO spfli.
        FORMAT COLOR 2.
        WRITE :/2 w_checkbox AS CHECKBOX,
                  spfli-carrid   UNDER text-001,
                  spfli-connid   UNDER text-002,
                  spfli-airpfrom UNDER text-003,
                  spfli-airpto   UNDER text-004,
                  spfli-deptime  UNDER text-007,
                  spfli-arrtime  UNDER text-011.
      ENDLOOP.                             " LOOP AT T_SPFLI...
    ENDFORM.                               " FORM DISPLAY_SPFLI_DATA
    FORM user_command .
      CASE sy-ucomm.
        WHEN 'SELECT'.
          w_checkbox1 = 'X'.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'DESELECT'.
          w_checkbox1 = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'RETRIEVE'.
          w_checkbox = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox.
            IF w_checkbox = 'X'.
              PERFORM fetch_sflight_data.
              PERFORM display_sflight_data.
            ENDIF.                         " IF W_CHECKBOX = 'X'
          ENDDO.                           " DO W_LINES TIMES.
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " FORM USER_COMMAND
    This report gives you the SPFLI Data and places a check box in front of each record. When u click on select all button it will select all the records. And if you click on deselect all it will deselect all the records. When you are trying this maintain the pf-status 'YMENU1' and give the function codes as in the code.
    Regards,
    Swapna.

  • How to view all procedures from commandprompt

    Hai All,
    we have query select * from tab; in oracle
    to view all tabels in database.Like this how can we view all procedures

    The oracle specific response:
    In oracle, select * from tab is actually only included for backwards compatibility (With Oracle 5)
    It is better to use the view USER_TABLES
    ie select * from user_tables
    For stored procedures:
    select * from user_procedures
    More applicable to the Java world, and also database independant, check out the class java.sql.DatabaseMetaData
    It has methods
    getTables() and getProcedures() that should give you much the same info, just directly in java.
    Cheers,
    evnafets

  • Not all rows have been retrieved.Data may be inaccurate

    Hai all,
    I have 12500 records in my table..when using disco, when am fetching all the records it is always displaying only 10,000 records.. and it displays the a/m subjected error and displays only 10k rows..
    Any suggestions ?
    Yusuf

    I have a user that is getting this error when she attempts to print the report.
    However I've run the SQL separately & I don't understand why the error is occurring. The SQL returns only 40 rows and the default return is set for 2000 rows.
    Any ideas?

  • Status Ended while starting all tasks in Management Console

    Hai All,
    While performinig Start operation for all the tasks in Management Console, status is turned to Ended for all 14 Tasks. Please guide me to clear the problem.
    Thanks in advance...

    Hai Mahesh,
    Thanks for your instant reply..
    I checked as you advised. Actually i found some log details in dev_coll file.In that last line its saying that dev_proc Fopen() function is not working.Also its asking to check that the file is present or not.
    I too checked in the PRFCLOG folder, but its not available..
    Kindly help me out to resolve this issue..
    Thanks & Regards,
    Kumar

  • Have to Change All IP's After RAC installation

    HAi all,
    I have deployed Oracle 10g 2 node RAC with CRS and ASM on linux AS4 on one of our biggest client of country.
    After succefully running ,they are now saying that they are having problem with the IP series and they have to change the IP series.
    So by this Public and virtual IP's of my RAC will also be changed.
    So my Problem is that How can i change the Public and private in my RAC database and cluster.?
    Or i have to install the RAC, ASM database right from biggning.
    Please Help soon!!
    Thanks and Regards
    Pankaj Rawat

    what a great accomplishment. I just started the installationon OLE5/RHEL5, Oracle 10g RAC using ASM and find it difficult to install. VIP is where I am having problem installing. Please advise.

  • Case of All zero MAC Address.......

    Haii all,
    Have anybody faced with a case of all zero MAC(Medium access control)address? Is there any IEEE standards regarding the zero mac address? pleas give me some answers or some informative links...
    Thanks in advance
    Sumode

    What does that have to do with j2me?I am not refering this to j2me. But a doubt regarding with the wireless application that a zero mac address is a standard or not?. how it affects a switch device when a zero mac address came to a switch device? I just want to make clear of this things. can anybody help?

Maybe you are looking for

  • What's new in Photoshop CS6 Monday 07 May, 10AM

    Join Senior Digital Imaging Evangelist Julieanne Kost as she shows off some of the new features of the world's best digital imagine software, Adobe Photoshop CS6 Extended, part of the new Adobe Creative Cloud. See the blazingly fast performance of th

  • Deployed mobile application not appearing in Mobile component

    Hi Experts I have downloaded the standard MAM (MAMLAPTOP3006_0-20001490.ZIP              SAP MOBILE ASSET MANAGEMENT 3.0 SR 06 (Laptop)      patch level - 0) From this I have a standard .war file which I am deploying in NWT server (10.191.97.208) I a

  • What is The first step intp J2EE?

    Dear all, I have no idea about J2EE, I want to master J2EE so, what which book do you advise me to read as the an introductory and what other books or ways you advise me to do. Thanks a lot

  • How to add a URL link to a WAD template

    Hi, the requirement is to have a kind of button in a WAD template that opens a document in a new browser window. (The document actually contains an extensive help for the application. It shall be stored in the portal CM and we have the URL for that)

  • Purchased used ipod touch how do i reset previous owners info with mine?

    I purchased an ipod touch from a friend. How do I reset personal info to mine?