Alv back ground execuion
Hi,
I want to run ALV in back ground.
I have two check boxes in selection screen.
One is for back griund execution and another is for direct execution.
There will be data base updation if i run in back groud or direct execution.
So how can i run program in back ground if click the check box.
Rgds,
Sunil.K
When you are running the program in background, the default value of the checkbox should be X or you should create a varaint by clicking the checkbox. Then you need to schedule a background job with that variant. Database updation will happoen even if you schedule it in background.
I hope it solves your problem, if not please revert.
Best Regards,
Vibha
*Please mark all the helpful answers
Similar Messages
-
GRID ALV - Back ground job - Seperate spool
Hi,
I have a report when executed in the foreground it gives me the output in ALV GRID and then when I click back it gives me classical output this is fine, But when I execute in the background the only 1 spool is generated with Classical output and the ALV output is missing. When I tried by commenting the Classic output code then ALV out put is appearing in the SPOOL.So the ALV spool is overwritten by the classical output in the spool. So pls let me know how to create another Spool for the ALV GRID and I am using the standard FM REUSE_ALV_GRID_DISPLAY for the ALV output.
regards,
PrabhuHi Guys,
Problem solved, using the Import parameter IS_PRINT in the F.M. - REUSE_ALV_GRID_DISPLAY, which creates new spool request for ALV.
Using ls_print-print = 'X'.
ls_print-no_print_selinfos = 'X'.
Regards,
Prabhu -
HI freinds,
I am shceduling the ALV Report in the background,
which resulting into some extra table of content
along with the actuall report.
I have requirement to avoid the the extra table of
content.
Anybody have any idea how to avoid the extra table of content above the actuall ALV report content. If anybody knows please help me.Amit
I have the right Variant, ihave the extra output as
two tablular display of as following.
Sort criteria Ascdg Descnd Subtotal
Std hier. X X
Customer group X
Customer X
Data statistics Number of
Records passed 4
Calculated total records 2
Then after i have the alv list. -
Problem when printing Alv Tree Report in back ground
Hi,
I am using SUBMIT ...TO SAP-SPOOL WITHOUT SPOOL DYNPRO with GET_PRINT_PARAMETERS FM.Its working fine.
My problem is that my SUBMIT report have TREE STRUCTURE as output so when i am running my program one blank screen is coming with heading DISPLAY LOG TREE because of TREE STRUCTURE.when i click on back button then only further processing happens.
How to avoid this TREE STRUCTURE SCREEN ???
Is there any other way to pass your list o/p to SPOOL other than .....TO SAP-SPOOL..?
Thanks in advance.in foreground when u run ALV report it holds maximum fields and displays in 1 single row, but the case is not in back ground...When any report is run in background, the default size for a line is 255 chars...So, if it more it gets splitted into 2 line item....This is how back ground job works for a report though it is a normal report or alv report.
-
Hi All,
Can we run alv report in back ground,if yes how?
Thanks&Regards.
Srikanth.Vhi Ramu,
Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
if sy-batch = ' '.
call 'REUSE_ALV_GRID_DISPLAY'.
else.
call 'REUSE_ALV_LIST_DISPLAY'.
endif.
if you are using OO alv then write this code..
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = off.
IF off IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
ENDIF. -
Hi friends, i got some problem in alv grid while i am running it in back ground.
my report contains some currency(amount) field in out put. when i am removing the amount field it is good result in back ground. but when it consist of amount field it is giving error. it indicating some string length problem. and error analysis as follows.
Error analysis
In statement
"STRLEN( obj )..."
the argument "obj" can only take a character-type data object.
In this case, the operand "obj" has the non-character type "P".
pls tell me can't we run amount field in back ground. if s how to solve my error. pls give me some ideas.
Kumar.Hi
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 wont 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 cant 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 doesnt 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.
/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job -
Reduce out put field length of alv output in back ground
Hi all,
Is there a way to reduce the output length of the field in back groundfor ALV out put
Its back ground
I have thsi things in my field catalog
wa_fieldcat-outputlen = 10.
wa_fieldcat-ddic_outputlen = 10.
If the field has value of length 10 characters its ok
but when the field has lenth of more than 10 characters
(say 20 char). in fore ground it displays 10 characters and then we can move the column to see full thing , but in back ground it displays 20 char.
In fact that is what i have to see because in background you cannot drag the column to see entire thing , but i want to cut short to 12 char even if i don't see the remaining thing its ok
ThanksHi Vasu,
WHAT EXACTLY SY-BATCH DOES .
I tried reducing wa_fieldcat-outputlen = 10. and then i tried
wa_fieldcat-outputlen = 5., but it doesnot really changed anything in back ground but it did in fore ground . I haven't used any called sy-batch
Let me know
This is how my field catalog looks for mATNR
clear wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-seltext_l = ' Material #'.
wa_fieldcat-seltext_m = 'Material #'.
wa_fieldcat-seltext_s = ' Material #'.
wa_fieldcat-reptext_ddic = 'Material #'.
wa_fieldcat-ddictxt = 'L'.
wa_fieldcat-col_pos = 4.
wa_fieldcat-outputlen = 18.
wa_fieldcat-intlen = 18.
wa_fieldcat-ddic_outputlen = 18.
wa_fieldcat-tabname = '1'.
append wa_fieldcat to fieldcat.
NEXT TIME I COMMENTED THIS AND HAD
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-seltext_l = ' Material #'.
wa_fieldcat-seltext_m = 'Material #'.
wa_fieldcat-seltext_s = ' Material #'.
wa_fieldcat-reptext_ddic = 'Material #'.
wa_fieldcat-ddictxt = 'L'.
wa_fieldcat-col_pos = 4.
wa_fieldcat-outputlen = 10.
wa_fieldcat-intlen = 10.
wa_fieldcat-ddic_outputlen = 10.
wa_fieldcat-tabname = '1'.
append wa_fieldcat to fieldcat.
BUT I DID SEE DIFFERENCE IN FOREBROUND BUT NOT IN BACK GROUND
Let me know
Thanks -
Execute in Back ground when push button clicked on alv output
Hi Friends,
I have a alv list display report with check boxes and a 'Detail' Push button in output
when i check the check boxes and click on the 'Detail' Push button detail report is
displayed using 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'. My requirement is if I click on 'Detail'
push button the code should also execute in back ground creating the spool. Request you
to help with sample code. I tried with below but not working.
WHEN 'DETAIL'.
call function 'START_OF_BACKGROUNDTASK'
exporting
startdate = sy-datum
starttime = sy-uzeit
exceptions
others = 1.
if sy-subrc = 1.
exit.
ELSE.
PERFORM determine_table_from_output CHANGING rs_selfield.
PERFORM call_alv_detail.
endif.
commit work.
Thanks,
Neetha.You could encapsulate the detail display in a separate report and call it in your 'DETAIL'-section like this:
DATA: lv_number TYPE tbtcjob-jobcount,
lv_name TYPE tbtcjob-jobname,
ls_rsparams TYPE rsparams,
lt_rsparams LIKE STANDARD TABLE OF ls_rsparams.
* Get free job number
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_name
IMPORTING
jobcount = lv_number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT 'ZDISPLAY_DETAIL'
VIA JOB lv_name NUMBER lv_number
WITH SELECTION-TABLE lt_rsparams
AND RETURN.
IF sy-subrc = 0.
* Submit
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_number
jobname = lv_name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
ENDIF.
Regards,
Ulrich -
Error in Back Ground processing of a report.
Hi All,
I have a report wherein I need to schedule it in background. Its an ALV report and it has got user defined GUI status. But for one of the selection options, only output is being displayed. Can this be scheduled in Back Ground?Hi all,
Thanks for your reply.
I got the solution. When a program is scheduled in background, if it is written in classes and ALV grid display is used, we get this error. I am able to schedule when I change the function module to LIST_DISPLAY. -
Hi experts ,
Hi have 70 fields in my ALV output. When the data is huge the output format in back ground is destorted ( overlapping).
When the data is less i could able to see alla colums appearing fine and can able to down load well?
I wanna know is there any limitation of spool capacity or number of coulumns * rows in ALV format .
Your help is highly rewarded.
Thanks n Regards,
VamsiHi,
Well then did you try to increase the line-size in the report statement of the program?
report ztest line-size 1023.
Regards,
Vikranth -
Hi friends, i got some problem in alv grid while i am running it in back ground.
my report contains some currency(amount) field in out put. when i am removing the amount field it is good result in back ground. but when it consist of amount field it is giving error. it indicating some string length problem. and error analysis as follows.
Error analysis
In statement
"STRLEN( obj )..."
the argument "obj" can only take a character-type data object.
In this case, the operand "obj" has the non-character type "P".
pls tell me can't we run amount field in back ground. if s how to solve my error. pls give me some ideas.
Kumar.Hi,
Refer the below theard and see the answer of <b>Charles Folwell</b>
https://forums.sdn.sap.com/click.jspa?searchID=4021002&messageID=209473
<b>Reward points</b>
Regards -
Hi SAP guru's
if I execute alv list display and alv grid display in back ground is there any difference.
is it possible printing a logo in back ground job schedule.
Points will be rewarded.Hi Durga, this will help u.
Some differences:
a) from abap coding point of view,
alv list is done with Function modules,
alv gris can also be done with FM,
but can also be done using OO concepts.
b) Alv grid (using oo concept) requires
designing the screen layout .
Hence, in one screen, we can show more
then one alv grid
(we cannot show more than
one alv list on one screen)
c) ALV grid uses ActiveX controls
present on the Presentation Server.
Hence, it consumes More Memory
on the presentation server.
d) ALV LIST is Display Only.
Whereas
ALV Grid Can Be made EDITABLE for entry purpose.
e) In alv grid, these options are possible,
but not in alv list.
without horizontal lines
without vertical lines
without cell merging during sorts
display total lines above the entries
ALV LIST Can be coded using only FMs
ALV GRID Can be coded using FMs and object oriented concepts
ALV LIST Can be displayed hieraicharlly
ALV GRID cannot be displayed hierarichally
Also, I am sending LOGO report, pls check it.
REPORT YMS_EXCISE MESSAGE-ID E4 NO STANDARD PAGE HEADING LINE-SIZE 350. .
TABLES : J_1IEXCHDR, " header table
J_1IEXCDTL, " item table
J_1IPART2, " Excise Part II details
LFA1, " vendor master table
J_1IMOVEND, " vendor excise details table
MSEG, " Document Segment: Material
MKPF, " Header: Material Document
DD07T, " domain text table
T001W. " Plant and Branch Details
DATA : BEGIN OF IT_CHDR OCCURS 100,
DOCNO LIKE J_1IEXCHDR-DOCNO,
DOCYR LIKE J_1IEXCHDR-DOCYR,
EXNUM LIKE J_1IEXCHDR-EXNUM,
EXDAT LIKE J_1IEXCHDR-EXDAT,
WERKS LIKE J_1IEXCHDR-WERKS,
EXBED LIKE J_1IEXCHDR-EXBED,
EXCCD LIKE J_1IEXCHDR-EXCCD,
ECS LIKE J_1IEXCHDR-ECS,
END OF IT_CHDR.
DATA : BEGIN OF IT_CDTL OCCURS 100,
DOCYR LIKE J_1IEXCDTL-DOCYR,
DOCNO LIKE J_1IEXCDTL-DOCNO,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
LIFNR LIKE J_1IEXCDTL-LIFNR,
MATNR LIKE J_1IEXCDTL-MATNR,
MAKTX LIKE J_1IEXCDTL-MAKTX,
CHAPID LIKE J_1IEXCDTL-CHAPID,
EXBAS LIKE J_1IEXCDTL-EXBAS,
EXBED LIKE J_1IEXCDTL-EXBED,
ECS LIKE J_1IEXCDTL-ECS,
MENGE LIKE J_1IEXCDTL-MENGE,
MEINS LIKE J_1IEXCDTL-MEINS,
RDOC2 LIKE J_1IEXCDTL-RDOC2,
END OF IT_CDTL.
DATA TEXT(10).
DATA : BEGIN OF IT_OUT OCCURS 0,
SERIALNO LIKE J_1IPART2-SERIALNO,
TEXT1 LIKE TEXT,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
NAME LIKE LFA1-NAME1,
DDTEXT LIKE DD07T-DDTEXT,
EXCCD LIKE J_1IEXCHDR-EXCCD,
BUDAT LIKE MKPF-BUDAT,
EXBAS LIKE IT_CDTL-EXBAS,
EXBED LIKE IT_CDTL-EXBED,
ECS LIKE IT_CDTL-ECS,
MATNR LIKE IT_CDTL-MATNR,
MAKTX LIKE IT_CDTL-MAKTX,
CHAPID LIKE IT_CDTL-CHAPID,
MENGE LIKE IT_CDTL-MENGE,
MEINS LIKE IT_CDTL-MEINS,
DEL_IND(1),
END OF IT_OUT.
DATA IT_PART2 LIKE J_1IPART2 OCCURS 0 WITH HEADER LINE.
DATA S_NO(4) .
DATA DB_CNT LIKE SY-TABIX.
DATA EBELN_T LIKE MSEG-EBELN .
TYPE-POOLS : SLIS.
DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LS_FTCAT TYPE LVC_S_FCAT,
SORTCAT TYPE SLIS_T_SORTINFO_ALV,
SORTCAT_LN LIKE LINE OF SORTCAT,
G_REPID LIKE SY-REPID,
G_BACK_GROUND(70), "like bapibds01-objkey,
GS_VARIANT LIKE DISVARIANT,
G_SAVE ,
GT_EVENTS TYPE SLIS_T_EVENT,
ALV_EVENT TYPE SLIS_ALV_EVENT,
EVENTCAT TYPE SLIS_T_EVENT,
EVENTCAT_LN LIKE LINE OF EVENTCAT,
LAYOUT_IN TYPE SLIS_LAYOUT_ALV,
LAYOUT_IN1 TYPE SLIS_LAYOUT_ALV.
CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
'TOP_OF_PAGE',
GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
'USER_COMMAND',
GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
'BEFORE_OUTPUT'.
ALV_EVENT TYPE SLIS_ALV_EVENT,
DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
DATA REGTYP_1 LIKE J_1IPART2-REGTYP.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS WERKS TYPE J_1IEXCHDR-WERKS.
SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
R2 RADIOBUTTON GROUP GRP.
SELECTION-SCREEN END OF BLOCK B.
INITIALIZATION.
G_REPID = SY-REPID.
G_SAVE = 'A'.
PERFORM BUILD_EVENT USING GT_EVENTS[].
PERFORM ALV_EVENT_INIT.
AT SELECTION-SCREEN.
REFRESH LIST_HEADER.
PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
START-OF-SELECTION.
PERFORM ALV_EVENT_INIT.
G_REPID = SY-REPID.
G_BACK_GROUND = ' ' .
IF R1 = 'X'.
CLEAR R2. CLEAR : REGTYP_1.
REGTYP_1 = 'A'.
set titlebar 'BALAJI' with DB_CNT.
ELSEIF R2 = 'X'.
CLEAR R1.CLEAR : REGTYP_1.
REGTYP_1 = 'C'.
set titlebar 'BALAJI1' with DB_CNT.
ENDIF.
SELECT * FROM J_1IPART2
INTO CORRESPONDING FIELDS OF TABLE IT_PART2
WHERE REGTYP = REGTYP_1 AND
TRNTYP = 'GRPO' AND
BUDAT IN BUDAT.
DOCYR = IT_CDTL-DOCYR AND
DOCNO = IT_CDTL-DOCNO.
LOOP AT IT_PART2.
SELECT SINGLE * FROM J_1IEXCHDR
INTO CORRESPONDING FIELDS OF IT_CHDR
WHERE TRNTYP = 'GRPO' AND
DOCYR = IT_PART2-DOCYR AND
DOCNO = IT_PART2-DOCNO AND
WERKS = WERKS AND
exdat IN BUDAT.
ORDER BY EXDAT.
IF SY-SUBRC = 0.
APPEND IT_CHDR.
ELSE.
CONTINUE.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE E084.
ENDIF.
ENDLOOP.
LOOP AT IT_CHDR.
SELECT * FROM J_1IEXCDTL
INTO CORRESPONDING FIELDS OF IT_CDTL
FOR ALL ENTRIES IN IT_CHDR
WHERE
TRNTYP = 'GRPO' AND
DOCNO = IT_CHDR-DOCNO AND
DOCYR = IT_CHDR-DOCYR AND
EXNUM = IT_CHDR-EXNUM AND
EXDAT = IT_CHDR-EXDAT AND
WERKS = IT_CHDR-WERKS.
IF SY-SUBRC = 0.
APPEND IT_CDTL.
ELSE.
CONTINUE.
ENDIF.
ENDSELECT.
ENDLOOP.
LOOP AT IT_CDTL.
CLEAR TEXT.
DB_CNT = DB_CNT + 1.
READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM.
READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
IT_OUT-SERIALNO = IT_PART2-SERIALNO.
SELECT SINGLE NAME1 FROM LFA1
INTO IT_OUT-NAME
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM LFA1
WHERE LIFNR = IT_CDTL-LIFNR.
IF LFA1-LAND1 EQ 'IN'.
TEXT = 'INVOICE'.
IT_OUT-TEXT1 = TEXT.
ELSE.
TEXT = 'BOE'.
IT_OUT-TEXT1 = TEXT.
ENDIF.
SELECT SINGLE * FROM J_1IMOVEND
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM DD07T
INTO IT_OUT-DDTEXT
WHERE DOMNAME = 'J_1IVTYP' AND
DDLANGUAGE = 'EN' AND
DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
OR
DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
DD07T-DDTEXT = 'Dealer'.
ENDIF.
IT_OUT-DDTEXT = DD07T-DDTEXT.
ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
*goods'.
DD07T-DDTEXT =
CLEAR EBELN_T.
SELECT SINGLE LFBNR FROM MSEG
INTO EBELN_T
WHERE MBLNR = IT_CDTL-RDOC2 .
SELECT SINGLE * FROM MSEG
WHERE BWART = '106' AND
LFBNR = EBELN_T ."and
ebeln = ebeln_t.
IF SY-SUBRC = 0.
IT_OUT-DEL_IND = 'X'.
ELSE.
IT_OUT-DEL_IND = ' '.
ENDIF.
SELECT SINGLE BUDAT FROM MKPF
INTO IT_OUT-BUDAT
WHERE MBLNR = EBELN_T ."MSEG-LFBNR.
IT_OUT-EXNUM = IT_CDTL-EXNUM.
IT_OUT-EXDAT = IT_CDTL-EXDAT.
IT_OUT-EXCCD = IT_CHDR-EXCCD.
IT_OUT-EXBAS = IT_CDTL-EXBAS.
IT_OUT-EXBED = IT_CDTL-EXBED.
IT_OUT-ECS = IT_CDTL-ECS.
IT_OUT-MATNR = IT_CDTL-MATNR.
IT_OUT-MAKTX = IT_CDTL-MAKTX.
IT_OUT-CHAPID = IT_CDTL-CHAPID.
IT_OUT-MENGE = IT_CDTL-MENGE.
IT_OUT-MEINS = IT_CDTL-MEINS.
APPEND IT_OUT.
EX_NO = IT_CDTL-EXNUM.
ENDLOOP.
Title Portion
IF REGTYP_1 = 'A'.
SET TITLEBAR 'BALAJI' WITH DB_CNT.
ELSEIF REGTYP_1 = 'C'.
SET TITLEBAR 'BALAJI1' WITH DB_CNT.
ENDIF.
AFIELD-COL_POS = 1.
AFIELD-FIELDNAME = 'SERIALNO'.
AFIELD-SELTEXT_L = 'INPUTS'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 2.
AFIELD-FIELDNAME = 'TEXT1'.
AFIELD-SELTEXT_L = 'TYPE OF DOC'.
AFIELD-JUST = 'L'.
AFIELD-DECIMALS_OUT = '0'.
AFIELD-NO_ZERO = 'X'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 3.
AFIELD-FIELDNAME = 'EXNUM'.
AFIELD-SELTEXT_L = 'DOC.NO'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 4.
AFIELD-FIELDNAME = 'EXDAT'.
AFIELD-SELTEXT_L = 'DOC.DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 5.
AFIELD-FIELDNAME = 'NAME'.
AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 6.
AFIELD-FIELDNAME = 'DDTEXT'.
AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 7.
AFIELD-FIELDNAME = 'EXCCD'.
AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 8.
AFIELD-FIELDNAME = 'BUDAT'.
AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 9.
AFIELD-FIELDNAME = 'EXBAS'.
AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
AFIELD-DO_SUM = 'X'.
AFIELD-JUST = 'R'.
AFIELD-DECIMALS_OUT = '2'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 10.
AFIELD-FIELDNAME = 'EXBED'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 11.
AFIELD-FIELDNAME = 'ECS'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 12.
AFIELD-FIELDNAME = 'MATNR'.
AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 13.
AFIELD-FIELDNAME = 'MAKTX'.
AFIELD-SELTEXT_L = 'DESCRIPTION'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 14.
AFIELD-FIELDNAME = 'CHAPID'.
AFIELD-SELTEXT_L = 'TARIFF-ID'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 15.
AFIELD-FIELDNAME = 'MENGE'.
AFIELD-SELTEXT_L = 'QUANTITY'.
AFIELD-JUST = 'R'.
AFIELD-DO_SUM = ' '.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 16.
AFIELD-FIELDNAME = 'MEINS'.
AFIELD-SELTEXT_L = 'UOM'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 17.
AFIELD-FIELDNAME = 'DEL_IND'.
AFIELD-SELTEXT_L = 'Deleted'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
* LAYOUT FOR ZEBRA CATLOG
LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT_IN-ZEBRA = 'X'.
LAYOUT_IN-GET_SELINFOS = 'X'.
LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
LAYOUT_IN-DETAIL_POPUP = 'X' .
SORTCAT-decimals = '0'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORTCAT
IS_LAYOUT = LAYOUT_IN
IT_EVENTS = EVENTCAT
I_BACKGROUND_ID = g_back_ground
TABLES
T_OUTTAB = IT_OUT.
*& Form TOP_OF_PAGE_LIST_HEADER
text
-->LIST_HEADERtext
FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
DATA : HLINE TYPE SLIS_LISTHEADER,
TEXT(60) TYPE C.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'PLANT :' TO TEXT.
WRITE WERKS TO TEXT+8.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-NAME1 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-STRAS TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-ORT01 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'DATE :' TO TEXT.
WRITE BUDAT-LOW TO TEXT+7.
IF BUDAT-HIGH NE ''.
WRITE 'TO' TO TEXT+18.
WRITE BUDAT-HIGH TO TEXT+22.
ENDIF.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
ENDFORM. "TOP_OF_PAGE_LIST_HEADER
*& Form ALV_EVENT_INIT
text
FORM ALV_EVENT_INIT .
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
APPEND ALV_EVENT TO GT_EVENTS.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
APPEND ALV_EVENT TO GT_EVENTS.
ENDFORM. "ALV_EVENT_INIT
*& Form ALV_TOP_OF_PAGE
text
FORM ALV_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LIST_HEADER
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "ALV_TOP_OF_PAGE
*& Form BUILD_EVENT
text
-->P_GT_EVENTS[] text
FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
ENDFORM. " BUILD_EVENT
kindly reward if found helpful.
cheers,
Hema. -
I have a report which is scheduled to run 2 times in the background.
here i am using OO ALV when to display output when run in back ground.
but i am getting an error when the same report is run in the back ground, stating there is a problem with the object references.
but one of my friend tried it and is successful to run in the background but another problem, when run in foreground 10 records are displayed and when run in background only 2 records are displayed for the same criteria.in both the cases i am sending the output to the file on appl server.
pls help me its urgent.
pionts are assured.Ravi,
I have faced the same problem when I schedule the job in background.
When the report was run in forground, it gives expected results, and when it run in background, it will supress some fields and disply the report output.
This problem, I have debugged it and corrected, and its application specific I can say, cant conclude it by seeing the problem, needs to do much research and fix it up.
Regards,
Sujatha. -
Report Back ground processing, error
Hi,
I tried to run my program in back ground. It is showing the following error. I'm just Pressing F9 and scheduling the job immediately. When i go and see the "own jobs " in SM36, it shows the "job cancelled". When i see the job log, it shows "Control Framework: Fatal error - GUI cannot be reached" and "ABAP/4 processor: RAISE_EXCEPTION". When i debug the job using JDBG transaction it runs smoothly and generates spool.
Can you provide some solutioons?HI,
Is your report having some OOPS functionalities?
Are you making use of any container or ALV GRID object.
In that case it will not run in background and will give you this error.
Search in SCN. This has been discussed a lto of times.
There are several posts on how to avoid this.
Regards,
Ankur Parab -
Hi all,
How can i process Back ground process on Object oriented
Thanks Rayeez,Hi Rayeez,
I had a requirement wherein I had to call ALV Grid display in background, here I used OO ABAP and just before creating the custom container I checked IF cl_gui_alv_grid=>offline( ) IS INITIAL.
You can find similar methods for your OO Class and check if it is initial.
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra
Maybe you are looking for
-
SP3 Upgrade fails to find Weblogic Server 6.1 installed
Hello, I have just downloaded SP3 for WLS 6.1. The machine´s im trying to install it on are a Sun box with solaris 8 and an intel box with redhat 7.2, the problem im encounting, when i install the service pack, is that the installer fails to find my
-
MRNB- Revaluation with Logistics Invoice Verification Vendor wise
Dear Experts, As per SAP standard MRNB transaction is vailable for Revaluation of Purchase Order Price changes. My requirement as below: We are manitaining Purchasing Info Records compulsory. when purchasing rate changes, we are changing Info Records
-
When to use primitive numbers range
Hi I am a noob and was just wondering in what programming situations I would use javas various number primitives e.g. int, double, byte, long, short, float. The only situations I have used numbers is: int - to represent whole numbers double - to repr
-
Revision: 8271 Author: [email protected] Date: 2009-06-25 16:25:28 -0700 (Thu, 25 Jun 2009) Log Message: Change the event type of List-based component's change, changing and caretChange events to a new event class: spark.events.IndexChangeEvent
-
Why Does Logic Pro Repeatedly Asks for Serial # and XSKey When Started?
I've purchased and installed an upgrade to Logic Studio 9. I previously used Logic Pro 7 but did not have it installed on my MacBook Pro when I installed Logic Studio 9. The installer asked for the Logic Studio 9 serial number which I entered and the