Hi gurus----- Urgent
HI,
can anyone send Full documentation for Selection-screen with all events. it is very urgent for me.
Thank u very much,
With regds
Sirisha
hi
this link will have the ABAP help...
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
reward if helpful,
Regards,
Guru
Similar Messages
-
Gud Afternoon,
I have to create Service entry sheet through ML81n. I am using this function. BAPI_ENTRYSHEET_CREATE. But i am not able to create service entry no.
147 Unplanned service service of testing may not be entered
I got a program from sdn site . but it is not working properly. Please I need some help regarding this..... please slove my problem.........
Thanks
Sirisha..........Hi Sirisha,
dont go for Any programs yaar....
Just go for that bapi Fm .
In that FM u can get import and tables parameters.
in that some structures are there .just search your table fields in those structures.
you should get the the fields in those structures.
with respective these structures you have to define the inernal tables and populate the data into internal tables.
call the FM and supply the internal tables to the respective parameters.
and use commit work
bapiret2 handle the errors.
and Entry Sheet Number is there in the structure-BAPIESSRTX.
Bye,
Ramu -
Help nedded from bw gurus ( urgently)
Hi i am srikanth and i am trying for a carrier in sap bw and as a sap tester
can any one solve my doubts - <b>please</b>
<b>Development side</b>
1 How do you maintain the work history and que related to all the customer generated tikets untill they close down ( please eloborate in step by step)
2 How do you analyze query performance to suggest optimization as per theory and practical observations
( plesae elobarate in step by step)
3 Monitoring infopackages and process chains and analyze the reasons for failure
<b>TESTING</b>
1 explain me the various testing phases they do in sap
2 How they do testing in cubes ( like CO-PA cubes
0COPA_C01, 0COPA_C02 and FI-AR ODS object 0FIAR_O03)
3 what testing they do in development phases
4 can you explain exactly like the steps followed for
testing in reporting ( GIVE SOME EXAMPLE)
5 Performing cross browser functionality testing on
multiple versions of SAP r/3
6 How do you Create Test input requirements and
prepared the test data for data
driven testing
7 how do yo Performe GAP analysis
<u><b>points will be rewarded to any one who help</b></u>Some of your questions cannot be answered riefly, so I chose the ones that can be:
<i>1 explain me the various testing phases they do in sap</i>
Unit Testing - Developers test before going to QAS to test small samples of data from Source to Query and make sure they match the transformations.
Integration Test - Developers test to make sure all the new landscape can work together with respect to laoding, transformation and queries.
Regression Test - Developers test to make sure current Objects do not aversely affect existing developemnt in landscape.
User Acceptance Test - Business USers test in QAS.
Business Integration Test - business tests in QAS.
<i>2 How they do testing in cubes ( like CO-PA cubes
0COPA_C01, 0COPA_C02 and FI-AR ODS object 0FIAR_O03)</i>
Refer above
<i>3 what testing they do in development phases</i>
Refer above
<i>4 can you explain exactly like the steps followed for
testing in reporting ( GIVE SOME EXAMPLE)</i>
I don't work a lot on queries, so wait for a front end guy to explain these. Clients that I worked with will usually have a different person doing query testing.
<i>5 Performing cross browser functionality testing on
multiple versions of SAP r/3</i>
<i>6 How do you Create Test input requirements and
prepared the test data for data
driven testing</i>
Didn't work on this much
<i>7 how do yo Performe GAP analysis</i>
This cannot be explained easily. Its a process of looking at requirements and while developing, identify what cannot be accomplished in this project for various reaons (Money, time, developer resoueces, etc) and working on a proposed solution for next phase, etc. -
plz help me out,its my first module pool. In it i have one field it should get all the values it had in the form of drop down list and the user can select from that list it doesnt have check list so how should we can do this..
plz its urgenthi,
make one module in POV....
PROCESS ON VALUE-REQUEST.
FIELD ifmtp-form_type MODULE fm_drop.
MODULE fm_drop INPUT.
CLEAR ifmtp.
REFRESH ifmtp.
ifmtp-form_type = 'C'.
APPEND ifmtp.
ifmtp-form_type = 'F'.
APPEND ifmtp.
ifmtp-form_type = 'H'.
APPEND ifmtp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FORM_TYPE'
value_org = 'S'
TABLES
value_tab = ifmtp.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " fm_drop INPUT
here ifmtp-form_type is my field on screen which i have made as list box...
its in top module ( data declaration)
DATA : BEGIN OF ifmtp OCCURS 0,
form_type LIKE zform_track_mast-form_type,
END OF ifmtp.
reward if usefull.... -
Excise duty account is not nullifying.
Hi,
gurus,
Urgent issue.
In billing Excise duty is going to a clearing recovery account and then during excise invoice creation its nullifying the clearing account and going to excise duty payable account.
but if we go to individual g/l account of excise duty recovered account it is not nullifying here.
pls suggest me if i am wrong ..
if further any conf. is to be done if so pls tell me..
Thanks & Regards,
Satish kumar.mDear All,
in the flow of billing system is showing correct flow ie.,
in accounting 2 doc were created
1)
Customer A/c Dr
To Sales
To ED Recovery Ac
To CST payable
2) entry (in excise )
ED Recovery A/c Dr
To,
H&S A/c
To,
E.Cess A/c
but my question is if we see individual entry in ED Recovery Account i am getting cr side more than dr.side
ie., it is not nullifying the entry.
my doubt is if we have to make any cof. if so pls tell me ..
Thanks & Regards,
Satish Kumar.M -
Give same role to multiple users in CUA
Hi gurus
Urgent!!!!!! need help
How do I give same roles to multiple users in CUA without going to user id and giving access to the same role individually in CUA.SU10 or SECATT
Edited by: John Navarro on Feb 22, 2008 10:22 PM -
Hi All Gurus,
Urgently need your advise on the above mentioned error.
While performing LIV, an error message stating "FCODE FO0 not yet supported" occurred for one of the P/O lines. The rest of the P/O lines are ok and can proceed with LIV execept this line.
thanks,
JLHi Ching Ling Chong,
FCODE it seems like some function code. Why don't you ask your ABAP technical guy too.
IF you can you provide the logtext help message, it will be better for analysis and giving suggestions.
Thanks and regards
Muruegsan -
Hi UPK Gurus,
Urgent need of your help, I am using UPK for developing content for my Client. All of sudden my UPK Developer crashed and when i restarted, i was prompted by UPK ( Configuring your system). Now all my previous content is lost..
Can you please help me as to how do i can see my old file in My Hard Drive or how do i restore my original Files and Modules.
Appreciate any help in this regards
Thanks a Ton ..
Regards,
DineshHello,
For urgent assistance, please use the Support site: http://support.oracle.com/
Best regards,
Marc -
Gurus,
I had written a BDC program for FV50 transaction..As it is an ENJOY transaction once u enter the company code it doesnt ask for the company code again if second time u go to this transaction...so to do this i made changes in the EDITING options and was able to do a BDC program for parking FI GL document..I made this BDC program a part of a Function module...when i call this FM from another program and pass the correct parameters it does not work...i have tried all the the tweaks but it doesnt work...it gives a error NO batch input available for screen SAPFM050 1001...
please help...
What shud i do...please suggest...
Thanks
Sam
Message was edited by:
Sam williamsEric, I have done that and included that functionality in the code also....let me attach my code:
************************BDC PROGRAM**************************************************************
PERFORM bdc_dynpro TABLES t_bdcdata USING 'SAPLACHD' '1000'.
PERFORM bdc_field TABLES t_bdcdata USING 'BDC_CURSOR'
'BKPF-BUKRS'.
PERFORM bdc_field TABLES t_bdcdata USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field TABLES t_bdcdata USING 'BKPF-BUKRS'
wa_document_header-comp_code.
PERFORM bdc_dynpro TABLES t_bdcdata USING 'SAPMF05A'
wa_document_header-comp_code.
PERFORM bdc_field TABLES t_bdcdata USING 'BDC_OKCODE'
'=PBBP'.
PERFORM bdc_field TABLES t_bdcdata USING 'ACGL_HEAD-BLDAT'
wa_document_header-doc_date.
PERFORM bdc_field TABLES t_bdcdata USING 'ACGL_HEAD-LDGRP'
var_ledger.
PERFORM bdc_field TABLES t_bdcdata USING 'ACGL_HEAD-BUDAT'
wa_document_header-pstng_date.
PERFORM bdc_field TABLES t_bdcdata USING 'ACGL_HEAD-XBLNR'
wa_document_header-ref_doc_no.
PERFORM bdc_field TABLES t_bdcdata USING 'ACGL_HEAD-BKTXT'
wa_document_header-header_txt.
PERFORM bdc_field TABLES t_bdcdata USING 'ACGL_HEAD-BLART'
wa_document_header-doc_type.
PERFORM bdc_field TABLES t_bdcdata USING 'BDC_CURSOR'
'ACGL_ITEM_GEN-GEN_CHAR2(02)'.
******Loop at the BDC Table to fill each line of items
LOOP AT t_bdc_document_item_main INTO wa_bdc_document_item_main.
idx = idx + 1.
ch3 = idx.
CONCATENATE 'ACGL_ITEM-HKONT('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_hkont.
CONCATENATE 'ACGL_ITEM-SHKZG('ch3')' INTO fname.
*****Transaction takes only H or S for Debit/Credit Indicator
IF wa_bdc_document_item_main-v_shkzg = 'C'.
var_shkzg = 'H'.
ELSEIF wa_bdc_document_item_main-v_shkzg = 'D'.
var_shkzg = 'S'.
ENDIF.
PERFORM bdc_field TABLES t_bdcdata USING fname
var_shkzg.
CONCATENATE 'ACGL_ITEM-WRBTR('ch3')' INTO fname.
MOVE: wa_bdc_document_item_main-v_wrbtr TO amount.
PERFORM bdc_field TABLES t_bdcdata USING fname
amount.
CONCATENATE 'ACGL_ITEM-SGTXT('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_sgtxt.
CONCATENATE 'ACGL_ITEM-PRCTR('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_prctr.
CONCATENATE 'ACGL_ITEM-KOSTL('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_kostl.
CONCATENATE 'ACGL_ITEM-BEWAR('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_bewar.
CONCATENATE 'ACGL_ITEM-VBUND('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_vbund.
CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR1('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_yylob.
CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR2('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_yycsg.
CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR3('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_yyprg.
CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR4('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_yydch.
CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR5('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_yymay.
CONCATENATE 'ACGL_ITEM-ZZITY('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzity.
CONCATENATE 'ACGL_ITEM-ZZSOU('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzsou.
CONCATENATE 'ACGL_ITEM-ZZPRO('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzpro.
CONCATENATE 'ACGL_ITEM-ZZACY('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzacy.
DI Fields added on 9/21/07
CONCATENATE 'ACGL_ITEM-ZZDIRNNAM('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzdirnnam.
CONCATENATE 'ACGL_ITEM-ZZDIRNTYP('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzdirntyp.
CONCATENATE 'ACGL_ITEM-ZZDIRNNUM('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzdirnnum.
CONCATENATE 'ACGL_ITEM-ZZDIFLNAM('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzdiflnam.
CONCATENATE 'ACGL_ITEM-ZZDIJRNID('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzdijrnid.
CONCATENATE 'ACGL_ITEM-ZZDIJRNLNK('ch3')' INTO fname.
PERFORM bdc_field TABLES t_bdcdata USING fname
wa_bdc_document_item_main-v_zzdijrnlnk.
End of Changes.
options-defsize = 'X'.
options-dismode = 'A'. "N - No Display = A - Display All
options-nobiend = 'X'.
options-nobinpt = 'X'.
ENDLOOP.
SET PARAMETER ID 'BUK' FIELD SPACE.
CALL TRANSACTION 'FV50L' USING t_bdcdata MESSAGES INTO
t_messages OPTIONS FROM options.
LOOP AT t_messages INTO wa_messages.
ADD 1 TO l_lines.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = wa_messages-msgid
msgnr = wa_messages-msgnr
msgv1 = wa_messages-msgv1
msgv2 = wa_messages-msgv2
msgv3 = wa_messages-msgv3
msgv4 = wa_messages-msgv4
IMPORTING
message_text_output = wa_result-message.
MOVE:wa_result-message TO wa_return-message,
wa_messages-msgtyp TO wa_result-result_flag,
wa_messages-msgv1+0(10) TO wa_result-document_number,
wa_messages-msgv2+0(4) TO wa_result-comp_code.
APPEND wa_result TO tb_result.
APPEND wa_return TO t_return.
CLEAR: wa_result,
wa_return.
ENDLOOP.
return[] = t_return[].
ENDFUNCTION.
Form Definition for new screen
FORM bdc_dynpro TABLES it_bdcdata STRUCTURE bdcdata USING program
dynpro.
DATA: wa_bdcdata TYPE bdcdata.
wa_bdcdata-program = program.
wa_bdcdata-dynpro = dynpro.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
ENDFORM. "BDC_DYNPRO
Form Definition to insert new field
FORM bdc_field TABLES it_bdcdata STRUCTURE bdcdata USING fnam fval.
DATA: wa_bdcdata TYPE bdcdata.
IF fval <> space.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = fnam.
wa_bdcdata-fval = fval.
APPEND wa_bdcdata TO it_bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD -
XML Gurus -My first request -Help needed urgently
Hi XML gurus,
I have a requirement to convert the following XML into two oracle tables.This is the first time I am looking at an XML script this closely....Could any of the gurus study the pattern of the xml and convert this into oracle tables with the constraints and post the script.After some thorough look I am able to conclude that the data has to be pushed into two tables.Appreciate your help!!
XML file is as below
- <Batch BatchCreated="633479274856698434" TransType="EISendCATProfile">
- <SiebelMessage>
- <CATProfiles>
- <CATProfile Id="1-6XCMTV3">
<CATCode>SE0</CATCode>
<LegacyHandled>N</LegacyHandled>
<DOLStart>05/31/2008</DOLStart>
<DOLEnd>06/02/2008</DOLEnd>
<Status>New</Status>
<TransStatus>Pending</TransStatus>
<Description>CAT SE0 MN Auto Wind and Hail Prop Wind, Hail and Other Weather 5/31 - 6/2</Description>
<GMTCreated>06/01/2008 14:23:26</GMTCreated>
<GMTUpdated>06/01/2008 14:31:21</GMTUpdated>
- <Details>
- <Detail Id="1-6XCMTV5">
<State>MN</State>
<PolicyType>Auto</PolicyType>
<ClaimType>Comprehensive</ClaimType>
<CauseOfLoss>Hail</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:23:47</GMTCreated>
<GMTUpdated>06/01/2008 14:24:11</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTV9">
<State>MN</State>
<PolicyType>Auto</PolicyType>
<ClaimType>Comprehensive</ClaimType>
<CauseOfLoss>Wind</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:24:11</GMTCreated>
<GMTUpdated>06/01/2008 14:24:28</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTVC">
<State>MN</State>
<PolicyType>Commercial Auto</PolicyType>
<ClaimType>Comprehensive</ClaimType>
<CauseOfLoss>Hail</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:24:29</GMTCreated>
<GMTUpdated>06/01/2008 14:24:45</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTVF">
<State>MN</State>
<PolicyType>Commercial Auto</PolicyType>
<ClaimType>Comprehensive</ClaimType>
<CauseOfLoss>Wind</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:24:47</GMTCreated>
<GMTUpdated>06/01/2008 14:25:10</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTVI">
<State>MN</State>
<PolicyType>Commercial Property</PolicyType>
<ClaimType>Commercial Property</ClaimType>
<CauseOfLoss>Windstorm & Hail</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:25:13</GMTCreated>
<GMTUpdated>06/01/2008 14:25:55</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTVL">
<State>MN</State>
<PolicyType>Homeowners</PolicyType>
<ClaimType>Property</ClaimType>
<CauseOfLoss>Hail</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:25:57</GMTCreated>
<GMTUpdated>06/01/2008 14:26:14</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTVO">
<State>MN</State>
<PolicyType>Homeowners</PolicyType>
<ClaimType>Property</ClaimType>
<CauseOfLoss>Wind</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:26:16</GMTCreated>
<GMTUpdated>06/01/2008 14:27:06</GMTUpdated>
</Detail>
- <Detail Id="1-6XCMTVU">
<State>MN</State>
<PolicyType>Homeowners</PolicyType>
<ClaimType>Property</ClaimType>
<CauseOfLoss>Other Weather Related</CauseOfLoss>
<Status>New</Status>
<GMTCreated>06/01/2008 14:29:35</GMTCreated>
<GMTUpdated>06/01/2008 14:29:52</GMTUpdated>
</Detail>
</Details>
</CATProfile>
</CATProfiles>
</SiebelMessage>
</Batch>
Thanks Much!
SridharI tried what you told AnanSmriti.
But still Server cannot find the page .
I have saved JSP pages in DefaultWebApp and Java class files in WEB-INF /classes under DefaultWebApp dir.
Also I have given the same URl in web.xml as in my first page.
Please tell me where am I going wrong.
Thanx in advance for any help. -
Hi sap gurus can u please improve the performance ,its very urgent :-sneha
REPORT ZFIR_GRIR_IPV
NO STANDARD PAGE HEADING
LINE-SIZE 120
MESSAGE-ID ZFI02.
TABLES: BSEG,BKPF.
TYPES: BEGIN OF A_FINAL,
BUKRS TYPE CHAR12,
HKONT_P TYPE CHAR18,
GJAHR TYPE CHAR11,
BELNR TYPE CHAR19,
BUDAT TYPE CHAR12,
WAERS TYPE CHAR8,
XBLNR TYPE CHAR20,
BLART TYPE CHAR13,
MONAT TYPE CHAR13,
DMBTR_P TYPE CHAR13,
KOSTL TYPE CHAR11,
PRCTR_P TYPE CHAR13,
HKONT_G TYPE CHAR18,
DMBTR_G TYPE CHAR13,
PRCTR_G TYPE CHAR13,
BUZID_G TYPE CHAR15,
END OF A_FINAL.
changes on 30 th may by dileep
TYPES: BEGIN OF IT_FINAL,
BUKRS TYPE BUKRS ,
HKONT TYPE HKONT,
BELNR TYPE BELNR_D,
DMBTR TYPE DMBTR ,
KOSTL TYPE KOSTL,
PRCTR TYPE PRCTR,
END OF IT_FINAL.
TYPES: BEGIN OF IT_FINAL1,
BUKRS TYPE BUKRS,
HKONT TYPE HKONT,
GJAHR TYPE GJAHR ,
BELNR TYPE BELNR_D,
BUDAT TYPE BUDAT,
WAERS TYPE WAERS ,
XBLNR TYPE XBLNR1,
BLART TYPE BLART,
MONAT TYPE MONAT,
DMBTR TYPE DMBTR,
KOSTL TYPE KOSTL,
PRCTR TYPE PRCTR,
END OF IT_FINAL1.
end of changes on 30 th may by dileep
TYPES: BEGIN OF P_FINAL,
BUKRS TYPE CHAR12,
DELIMITER_1 TYPE CHAR1,
HKONT_P TYPE CHAR18,
DELIMITER_2 TYPE CHAR1,
GJAHR TYPE CHAR11,
DELIMITER_3 TYPE CHAR1,
BELNR TYPE CHAR19,
DELIMITER_4 TYPE CHAR1,
BUDAT TYPE CHAR12,
DELIMITER_5 TYPE CHAR1,
WAERS TYPE CHAR8,
DELIMITER_6 TYPE CHAR1,
XBLNR TYPE CHAR20,
DELIMITER_7 TYPE CHAR1,
BLART TYPE CHAR13,
DELIMITER_8 TYPE CHAR1,
MONAT TYPE CHAR13,
DELIMITER_9 TYPE CHAR1,
DMBTR_P TYPE CHAR13,
DELIMITER_10 TYPE CHAR1,
KOSTL TYPE CHAR11,
DELIMITER_11 TYPE CHAR1,
PRCTR_P TYPE CHAR13,
DELIMITER_12 TYPE CHAR1,
HKONT_G TYPE CHAR18,
DELIMITER_13 TYPE CHAR1,
DMBTR_G TYPE CHAR13,
DELIMITER_14 TYPE CHAR1,
PRCTR_G TYPE CHAR13,
DELIMITER_15 TYPE CHAR1,
BUZID_G TYPE CHAR15,
END OF P_FINAL.
DATA: IT_BSEG TYPE STANDARD TABLE OF IT_FINAL INITIAL SIZE 0,
I_BSEG TYPE STANDARD TABLE OF IT_FINAL1 INITIAL SIZE 0,
I_FINAL TYPE STANDARD TABLE OF A_FINAL INITIAL SIZE 0 WITH HEADER LINE,
I_FINAL_P TYPE STANDARD TABLE OF P_FINAL INITIAL SIZE 0 WITH HEADER LINE,
W_FINAL_P TYPE P_FINAL,
W_BSEG1 TYPE BSEG,
WA_BSEG TYPE IT_FINAL OCCURS 0 WITH HEADER LINE,
W_BSEG TYPE IT_FINAL1 OCCURS 0 WITH HEADER LINE,
T_BSEG TYPE STANDARD TABLE OF BSEG INITIAL SIZE 0 WITH HEADER LINE,
W_FINAL TYPE A_FINAL,
F_YEAR TYPE BAPI0002_4-FISCAL_YEAR,
F_PERIOD TYPE BAPI0002_4-FISCAL_PERIOD,
RETURN1 TYPE BAPIRETURN1,
V_DATE TYPE CHAR8, " Date in YYYYMMDD format
V_PRESPATH TYPE STRING, " Path
V_APPPATH TYPE STRING, " Path
V_FILENAME(25) TYPE C, " File Name
V_PERIOD TYPE CHAR3, " Date for Posting Period
V_FSYEAR TYPE BDATJ, " Fiscal Year
L_TEXT TYPE CHAR1. " Hypen
CONSTANTS: C_TXT TYPE CHAR4 VALUE '.txt', " File Extension
C_TXT1 TYPE STRING VALUE 'txt', " File Type
C_FLAG_X TYPE CHAR1 VALUE 'X', " Flag
C_ASC TYPE FILETYPE VALUE 'ASC', " File type
C_DAT TYPE CHAR4 VALUE '.dat', " File Type
C_FLAG_1 TYPE CHAR1 VALUE '1', " Constant value
C_ZERO TYPE CHAR1 VALUE '0', " Constant
C_GLD(10) TYPE C VALUE 'GRIR021S', " Constant in file Path
C_DIR TYPE CHAR3 VALUE 'C:\', " Presentation Server path
C_FLAG_12 TYPE CHAR2 VALUE '12', " Constant value
C_PCFILE TYPE STRING VALUE 'PC File',
C_DELIMITER TYPE C VALUE '|'.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
*--- Selection Criteria
SELECT-OPTIONS: S_BUKRS FOR BSEG-BUKRS DEFAULT '012T', " Company Code
S_HKONT FOR BSEG-HKONT OBLIGATORY DEFAULT '4505001',
S_GJAHR FOR BKPF-GJAHR DEFAULT SY-DATUM+0(4),
S_MONAT FOR BKPF-MONAT DEFAULT SY-DATUM+4(2),
S_BELNR FOR BSEG-BELNR ,
S_BUDAT FOR BKPF-BUDAT ,
S_PRCTR FOR BSEG-PRCTR OBLIGATORY DEFAULT '12TOTH00',
S_BLART FOR BKPF-BLART OBLIGATORY DEFAULT 'RE'.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
*--- Radio Buttons for chose the PC Path or App.. Server Path
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS:
RB_PFILE RADIOBUTTON GROUP RAD2 DEFAULT 'X' USER-COMMAND UCOMM1.
SELECTION-SCREEN COMMENT 5(27) TEXT-002 FOR FIELD RB_PFILE.
PARAMETERS:
P_PFILE LIKE RLGRAP-FILENAME LOWER CASE.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS:
RB_AFILE RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN COMMENT 5(27) TEXT-003 FOR FIELD RB_AFILE.
PARAMETERS:
P_AFILE LIKE RLGRAP-FILENAME LOWER CASE. " Path for AS
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PFILE.
*-- Select File name with Dialog Box
PERFORM SUB_GET_FILENAME CHANGING P_PFILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_AFILE.
*--- Attach F4 HELP CORRESPONDING TO THE FIELD
PERFORM SUB_AP_F4.
AT SELECTION-SCREEN OUTPUT.
*--Modify screen parameters
PERFORM SUB_MODIFY_SCREEN.
AT SELECTION-SCREEN.
*--- Selection Screen validations for Company Code
PERFORM SUB_VALIDATION_BUKRS.
*--- Selection Screen validations for Chart of Accounts
PERFORM SUB_VALIDATION_HKONT.
*--- Selection Screen validations Fiscal Year
PERFORM SUB_VALIDATION_GJAHR.
*--- Selection Screen validations for Peiod
PERFORM SUB_VALIDATION_MONAT.
*--- Selection Screen validations for Company Code
PERFORM SUB_VALIDATION_BELNR.
*--- Selection Screen validations for Chart of Accounts
PERFORM SUB_VALIDATION_BUDAT.
*--- Selection Screen validations Fiscal Year
PERFORM SUB_VALIDATION_PRCTR.
*--- Selection Screen validations for Peiod
PERFORM SUB_VALIDATION_BLART.
START-OF-SELECTION
START-OF-SELECTION.
*--- Check whether filepath/name have been entered in the sel screen
PERFORM SUB_CHECK_FILEPATH.
*--- Prepare Final Internal Table.
PERFORM SUB_PREPARE_FINAL.
*--- Download data.
PERFORM SUB_DOWNLOAD_DATA .
*& Form sub_get_filename
text
<--P_PFILE Presentation server File name
FORM SUB_GET_FILENAME CHANGING P_FILE TYPE C.
DATA : L_FILENAME TYPE STRING, " For File Name
L_PATH TYPE STRING, " For Directory
L_FULLPATH TYPE STRING. " Full path
*--- For File Open Dialog Box
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = C_PCFILE " Window Title
DEFAULT_EXTENSION = C_TXT1 " File Extn
PROMPT_ON_OVERWRITE = C_FLAG_X " Over write
CHANGING
FILENAME = L_FILENAME " File Name
PATH = L_PATH " File Path
FULLPATH = L_FULLPATH " Full Path
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF SY-SUBRC NE 0.
*--- Error in opening the file
MESSAGE E000.
ELSE.
CONCATENATE L_PATH
L_FILENAME
INTO P_FILE.
V_PRESPATH = L_PATH.
ENDIF.
ENDFORM. " sub_get_filename
*& Form sub_ap_f4
f4 help attched with application server
FORM SUB_AP_F4 .
*--- FM for to get the Application Server Path
IF RB_AFILE = C_FLAG_X.
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
DIRECTORY =
FILEMASK = C_ASC " File Extn
IMPORTING
SERVERFILE = P_AFILE " File Path
EXCEPTIONS
CANCELED_BY_USER = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
*--- Error in opening the file
MESSAGE E000.
ENDIF.
ENDIF.
ENDFORM. " sub_ap_f4
*& Form sub_modify_screen
text
--> p1 text
<-- p2 text
FORM SUB_MODIFY_SCREEN .
*--- Selection screen Modifications
IF RB_PFILE = C_FLAG_X.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_PFILE' OR
SCREEN-NAME = '%_P_PFILE_%_APP_%-TEXT'.
SCREEN-ACTIVE = C_FLAG_1.
CONCATENATE C_DIR C_GLD V_DATE SY-UZEIT(4) C_TXT INTO P_PFILE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_PFILE' OR
SCREEN-NAME = '%_P_PFILE_%_APP_%-TEXT'.
SCREEN-ACTIVE = C_ZERO.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF RB_AFILE = C_FLAG_X.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_AFILE' OR
SCREEN-NAME = '%_P_AFILE_%_APP_%-TEXT'.
SCREEN-ACTIVE = C_FLAG_1.
CONCATENATE '/Solectron/Data/' C_GLD V_DATE SY-UZEIT(4) C_DAT
INTO P_AFILE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_AFILE' OR
SCREEN-NAME = '%_P_AFILE_%_APP_%-TEXT'.
SCREEN-ACTIVE = C_ZERO.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF RB_PFILE = C_FLAG_X.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_PFILE'.
SCREEN-ACTIVE = C_FLAG_1.
ENDIF.
IF SCREEN-NAME = 'P_AFILE'.
SCREEN-ACTIVE = C_ZERO.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF RB_AFILE = C_FLAG_X.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_PFILE'.
SCREEN-ACTIVE = C_ZERO.
ENDIF.
IF SCREEN-NAME = 'P_AFILE'.
SCREEN-ACTIVE = C_FLAG_1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDFORM. " sub_modify_screen
*& Form sub_validation_bukrs
Validation For Company Code
FORM SUB_VALIDATION_BUKRS .
DATA: L_BUKRS TYPE BUKRS. " Company Code
IF S_BUKRS IS NOT INITIAL.
IF S_BUKRS-HIGH IS NOT INITIAL AND S_BUKRS-LOW IS INITIAL.
MESSAGE E006.
ELSE.
*--- Validation for chart of accounts
SELECT BUKRS " Company Code
FROM T001 UP TO 1 ROWS
INTO L_BUKRS
WHERE BUKRS IN S_BUKRS.
ENDSELECT.
IF SY-SUBRC NE 0.
*--- Invalid Company code
MESSAGE E001.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_bukrs
*& Form sub_validation_hkont
Validation For General Ledger Account
FORM SUB_VALIDATION_HKONT .
DATA: L_HKONT TYPE HKONT. " General Ledger Account
IF S_HKONT IS INITIAL.
MESSAGE E002.
ELSE.
IF S_HKONT-HIGH IS NOT INITIAL AND S_HKONT-LOW IS INITIAL.
MESSAGE E006.
ELSE.
*--- Validation for chart of accounts
SELECT SAKNR " General Ledger Account
FROM SKA1 UP TO 1 ROWS
INTO L_HKONT
WHERE SAKNR IN S_HKONT AND KTOPL = '1SLR'.
ENDSELECT.
IF SY-SUBRC NE 0.
*--- Invalid General Ledger Account
MESSAGE E003.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_hkont
*& Form sub_validation_gjahr
Validation For Fiscal Year
FORM SUB_VALIDATION_GJAHR .
DATA: L_GJAHR TYPE GJAHR. " Fiscal Year
IF S_GJAHR IS NOT INITIAL.
IF S_GJAHR-HIGH IS NOT INITIAL AND S_GJAHR-LOW IS INITIAL.
MESSAGE E006.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_gjahr
*& Form sub_validation_monat
Validation For Fiscal period
FORM SUB_VALIDATION_MONAT .
DATA: L_MONAT TYPE MONAT. " Fiscal period
IF S_MONAT IS NOT INITIAL.
IF S_MONAT-LOW LE C_ZERO.
*--- Invalid Fiscal Period
MESSAGE E006.
ENDIF.
IF S_MONAT-HIGH GT C_FLAG_12.
*--- Invalid Fiscal Period
MESSAGE E007.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_monat
*& Form sub_validation_belnr
Validation For Accounting Document Number
FORM SUB_VALIDATION_BELNR .
DATA: L_BELNR TYPE BELNR_D. " Accounting Document Number
IF S_BELNR IS NOT INITIAL.
IF S_BELNR-HIGH IS NOT INITIAL AND S_BELNR-LOW IS INITIAL.
MESSAGE E006.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_belnr
*& Form sub_validation_budat
Validation For Posting Date
FORM SUB_VALIDATION_BUDAT .
DATA: L_BUDAT TYPE BUDAT. " Posting Date
IF S_BUDAT IS NOT INITIAL.
IF S_BUDAT-HIGH IS NOT INITIAL AND S_BUDAT-LOW IS INITIAL.
MESSAGE E006.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_budat
*& Form sub_validation_prctr
Validation For Profit Center
FORM SUB_VALIDATION_PRCTR .
DATA: L_PRCTR TYPE PRCTR. " Profit Center
IF S_PRCTR IS INITIAL.
MESSAGE E010.
ELSE.
IF S_PRCTR-HIGH IS NOT INITIAL AND S_PRCTR-LOW IS INITIAL.
MESSAGE E006.
ELSE.
*--- Validation for chart of accounts
SELECT PRCTR " Profit Center
FROM CEPC UP TO 1 ROWS
INTO L_PRCTR
WHERE PRCTR IN S_PRCTR.
ENDSELECT.
IF SY-SUBRC NE 0.
*--- Invalid Profit Center
MESSAGE E011.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_prctr
*& Form sub_validation_blart
Validation For Document type
FORM SUB_VALIDATION_BLART .
DATA: L_BLART TYPE BLART. " Document type
IF S_BLART IS INITIAL.
MESSAGE E012.
ELSE.
IF S_BLART-HIGH IS NOT INITIAL AND S_BLART-LOW IS INITIAL.
MESSAGE E006.
ENDIF.
ENDIF.
ENDFORM. " sub_validation_blart
*& Form sub_check_filepath
Check user input for initial filename
FORM SUB_CHECK_FILEPATH .
IF RB_PFILE = C_FLAG_X.
IF P_PFILE IS INITIAL.
*--- The Local File Path can not be Empty
MESSAGE I014.
LEAVE LIST-PROCESSING.
ENDIF.
ELSEIF RB_AFILE = C_FLAG_X.
IF P_AFILE IS INITIAL.
*--- The App Server File Path can not be Empty
MESSAGE I015.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ENDFORM. " sub_check_filepath
*& Form sub_prepare_final
append the required output data in to the internal table.
FORM SUB_PREPARE_FINAL.
changes on 30 th may by dileep
SELECT * FROM BSEG INTO TABLE I_BSEG WHERE HKONT IN S_HKONT AND "G/L Account
GJAHR IN S_GJAHR AND
PRCTR IN S_PRCTR AND "Profit Center
BLART IN S_BLART . "Document Type
SELECT BUKRS
HKONT
BELNR
DMBTR
KOSTL
PRCTR
FROM BSEG INTO TABLE IT_BSEG WHERE HKONT IN S_HKONT AND "G/L Account
PRCTR IN S_PRCTR. "Profit Center
LOOP AT IT_BSEG INTO WA_BSEG.
SELECT SINGLE GJAHR
BUDAT
WAERS
XBLNR
BLART
MONAT
INTO (W_BSEG-GJAHR,W_BSEG-BUDAT,W_BSEG-WAERS,W_BSEG-XBLNR,W_BSEG-BLART,W_BSEG-MONAT)
FROM BKPF WHERE BELNR = W_BSEG-BELNR AND
GJAHR IN S_GJAHR AND
BLART IN S_BLART . "Document Type
MOVE WA_BSEG-BUKRS TO W_BSEG-BUKRS.
MOVE WA_BSEG-HKONT TO W_BSEG-HKONT.
MOVE WA_BSEG-BELNR TO W_BSEG-BELNR.
MOVE WA_BSEG-DMBTR TO W_BSEG-DMBTR.
MOVE WA_BSEG-KOSTL TO W_BSEG-KOSTL.
MOVE WA_BSEG-PRCTR TO W_BSEG-PRCTR.
APPEND W_BSEG TO I_BSEG.
ENDLOOP.
changes on 30 th may by dileep
IF S_BUKRS IS NOT INITIAL.
SORT I_BSEG BY BUKRS ASCENDING.
DELETE I_BSEG WHERE NOT BUKRS IN S_BUKRS.
ENDIF.
IF S_MONAT IS NOT INITIAL.
SORT I_BSEG BY GJAHR MONAT ASCENDING.
IF S_MONAT-HIGH IS NOT INITIAL AND S_MONAT-LOW IS NOT INITIAL.
DELETE I_BSEG WHERE MONAT < S_MONAT-LOW OR MONAT > S_MONAT-HIGH.
ENDIF.
IF S_MONAT-HIGH IS INITIAL AND S_MONAT-LOW IS NOT INITIAL.
DELETE I_BSEG WHERE MONAT NE S_MONAT-LOW.
ENDIF.
ENDIF.
IF S_BELNR IS NOT INITIAL.
SORT I_BSEG BY BELNR ASCENDING.
DELETE I_BSEG WHERE NOT BELNR IN S_BELNR.
ENDIF.
IF S_BUDAT IS NOT INITIAL.
SORT I_BSEG BY BUDAT ASCENDING.
DELETE I_BSEG WHERE NOT BUDAT IN S_BUDAT.
ENDIF.
LOOP AT I_BSEG INTO W_BSEG.
MOVE W_BSEG-BUKRS TO W_FINAL-BUKRS.
MOVE W_BSEG-HKONT TO W_FINAL-HKONT_P.
MOVE W_BSEG-GJAHR TO W_FINAL-GJAHR.
MOVE W_BSEG-BELNR TO W_FINAL-BELNR.
MOVE W_BSEG-BUDAT TO W_FINAL-BUDAT.
MOVE W_BSEG-WAERS TO W_FINAL-WAERS.
MOVE W_BSEG-XBLNR TO W_FINAL-XBLNR.
MOVE W_BSEG-BLART TO W_FINAL-BLART.
MOVE W_BSEG-MONAT TO W_FINAL-MONAT.
MOVE W_BSEG-DMBTR TO W_FINAL-DMBTR_P.
MOVE W_BSEG-KOSTL TO W_FINAL-KOSTL.
MOVE W_BSEG-PRCTR TO W_FINAL-PRCTR_P.
SELECT SINGLE * FROM BSEG INTO W_BSEG1 WHERE BELNR = W_BSEG-BELNR AND "Document Type
BUZID = 'W' .
IF SY-SUBRC = 0.
MOVE W_BSEG1-HKONT TO W_FINAL-HKONT_G.
MOVE W_BSEG1-DMBTR TO W_FINAL-DMBTR_G.
MOVE W_BSEG1-PRCTR TO W_FINAL-PRCTR_G.
MOVE W_BSEG1-BUZID TO W_FINAL-BUZID_G.
ELSE.
EXIT.
ENDIF.
APPEND W_FINAL TO I_FINAL.
SORT I_FINAL BY BELNR ASCENDING.
ENDLOOP.
ENDFORM. " sub_prepare_final
*& Form sub_download_data
Download data
FORM SUB_DOWNLOAD_DATA .
DATA : V_PRD(2) TYPE N.
IF RB_PFILE = C_FLAG_X.
*--- Downloading To presentation server
V_PRESPATH = P_PFILE.
PERFORM SUB_DOWNLOAD_PRESSERVER.
ELSEIF RB_AFILE = C_FLAG_X.
*--- Downloading To Application server in Auto Mode
V_APPPATH = P_AFILE.
PERFORM SUB_DOWNLOAD_APPSERVER.
ENDIF.
ENDFORM. " sub_download_data
*& Form sub_download_presserver
text
FORM SUB_DOWNLOAD_PRESSERVER.
DATA: MESSAGE TYPE STRING.
IF I_FINAL[] IS INITIAL.
MESSAGE I016.
EXIT.
ELSE.
W_FINAL_P-BUKRS = 'Company Code'.
W_FINAL_P-DELIMITER_1 = '|'.
W_FINAL_P-HKONT_P = 'G/L Account Number'.
W_FINAL_P-DELIMITER_2 = '|'.
W_FINAL_P-GJAHR = 'Fiscal Year'.
W_FINAL_P-DELIMITER_3 = '|'.
W_FINAL_P-BELNR = 'A/c Document Number'.
W_FINAL_P-DELIMITER_4 = '|'.
W_FINAL_P-BUDAT = 'Posting Date' .
W_FINAL_P-DELIMITER_5 = '|'.
W_FINAL_P-WAERS = 'Currency'.
W_FINAL_P-DELIMITER_6 = '|'.
W_FINAL_P-XBLNR = 'Ref. Document Number'.
W_FINAL_P-DELIMITER_7 = '|'.
W_FINAL_P-BLART = 'Document Type'.
W_FINAL_P-DELIMITER_8 = '|'.
W_FINAL_P-MONAT = 'Fiscal Period'.
W_FINAL_P-DELIMITER_9 = '|'.
W_FINAL_P-DMBTR_P = 'Amount'.
W_FINAL_P-DELIMITER_10 = '|'.
W_FINAL_P-KOSTL = 'Cost Center'.
W_FINAL_P-DELIMITER_11 = '|'.
W_FINAL_P-PRCTR_P = 'Profit Center'.
W_FINAL_P-DELIMITER_12 = '|'.
W_FINAL_P-HKONT_G = 'G/L Account Number'.
W_FINAL_P-DELIMITER_13 = '|'.
W_FINAL_P-DMBTR_G = 'Amount'.
W_FINAL_P-DELIMITER_14 = '|'.
W_FINAL_P-PRCTR_G = 'Profit Center'.
W_FINAL_P-DELIMITER_15 = '|'.
W_FINAL_P-BUZID_G = 'Line Item Id'.
APPEND W_FINAL_P TO I_FINAL_P.
LOOP AT I_FINAL INTO W_FINAL.
W_FINAL_P-BUKRS = W_FINAL-BUKRS.
W_FINAL_P-DELIMITER_1 = '|'.
W_FINAL_P-HKONT_P = W_FINAL-HKONT_P.
W_FINAL_P-DELIMITER_2 = '|'.
W_FINAL_P-GJAHR = W_FINAL-GJAHR.
W_FINAL_P-DELIMITER_3 = '|'.
W_FINAL_P-BELNR = W_FINAL-BELNR.
W_FINAL_P-DELIMITER_4 = '|'.
W_FINAL_P-BUDAT = W_FINAL-BUDAT .
W_FINAL_P-DELIMITER_5 = '|'.
W_FINAL_P-WAERS = W_FINAL-WAERS.
W_FINAL_P-DELIMITER_6 = '|'.
W_FINAL_P-XBLNR = W_FINAL-XBLNR.
W_FINAL_P-DELIMITER_7 = '|'.
W_FINAL_P-BLART = W_FINAL-BLART.
W_FINAL_P-DELIMITER_8 = '|'.
W_FINAL_P-MONAT = W_FINAL-MONAT.
W_FINAL_P-DELIMITER_9 = '|'.
W_FINAL_P-DMBTR_P = W_FINAL-DMBTR_P.
W_FINAL_P-DELIMITER_10 = '|'.
W_FINAL_P-KOSTL = W_FINAL-KOSTL.
W_FINAL_P-DELIMITER_11 = '|'.
W_FINAL_P-PRCTR_P = W_FINAL-PRCTR_P.
W_FINAL_P-DELIMITER_12 = '|'.
W_FINAL_P-HKONT_G = W_FINAL-HKONT_G.
W_FINAL_P-DELIMITER_13 = '|'.
W_FINAL_P-DMBTR_G = W_FINAL-DMBTR_G.
W_FINAL_P-DELIMITER_14 = '|'.
W_FINAL_P-PRCTR_G = W_FINAL-PRCTR_G.
W_FINAL_P-DELIMITER_15 = '|'.
W_FINAL_P-BUZID_G = W_FINAL-BUZID_G.
APPEND W_FINAL_P TO I_FINAL_P.
CLEAR : W_FINAL_P, W_FINAL.
ENDLOOP.
ENDIF.
*---Downloading data to file on Presentation Server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = V_PRESPATH
FILETYPE = 'ASC'
TABLES
DATA_TAB = I_FINAL_P
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
*-- File can not be opened successfully
IF SY-SUBRC NE 0.
IF SY-BATCH EQ C_FLAG_X. " Stop Processing
MESSAGE E017. " File could not be opened
ELSE.
MESSAGE I017. " File could not be opened
LEAVE LIST-PROCESSING.
ENDIF.
ELSE.
CONCATENATE 'Data Successfully downloaded to the Specified Location' V_PRESPATH INTO MESSAGE SEPARATED BY SPACE.
MESSAGE MESSAGE TYPE 'S'.
ENDIF.
MODIFY SCREEN.
ENDFORM. " sub_download_presserver
*& Form sub_download_appserver
text
FORM SUB_DOWNLOAD_APPSERVER .
DATA: V_FILE TYPE STRING, " String
P_DMBTR TYPE CHAR20,
G_DMBTR TYPE CHAR20,
MESSAGE1 TYPE STRING.
IF I_FINAL[] IS INITIAL.
IF SY-BATCH EQ C_FLAG_X.
*--- File contains no data
MESSAGE E016 .
ELSE.
*--- File contains no data
MESSAGE I016 .
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
*--- To Open The file in Application Server
OPEN DATASET V_APPPATH FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC NE 0.
*--- Display error message: "Could not open file"
IF SY-BATCH EQ C_FLAG_X.
*--- File contains no data
MESSAGE E016 .
ELSE.
*--- File contains no data
MESSAGE I016 .
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
*--- Perform for building the Report header
CONCATENATE
'COMPANY_CODE'
'G/L_ACCOUNT_NUMBER'
'FISCAL_YEAR'
'A/C_DOCUMENT_NUMBER'
'POSTING_DATE'
'CURRENCY'
'REF_DOCUMENT_NUMBER'
'DOCUMENT_TYPE'
'FISCAL_PERIOD'
'AMOUNT'
'COSTCENTER'
'PROFIT_CENTER'
'G/L_ACCOUNT_NUMBER'
'AMOUNT'
'PROFIT_CENTER'
'LINE_ITEM_ID'
INTO V_FILE SEPARATED BY C_DELIMITER.
TRANSFER V_FILE TO V_APPPATH.
*--- Transfer the data to application Server
LOOP AT I_FINAL INTO W_FINAL.
P_DMBTR = W_FINAL-DMBTR_P.
G_DMBTR = W_FINAL-DMBTR_G.
CONCATENATE
W_FINAL-BUKRS
W_FINAL-HKONT_P
W_FINAL-GJAHR
W_FINAL-BELNR
W_FINAL-BUDAT
W_FINAL-WAERS
W_FINAL-XBLNR
W_FINAL-BLART
W_FINAL-MONAT
P_DMBTR
W_FINAL-KOSTL
W_FINAL-PRCTR_P
W_FINAL-HKONT_G
G_DMBTR
W_FINAL-PRCTR_G
W_FINAL-BUZID_G
INTO V_FILE SEPARATED BY C_DELIMITER.
TRANSFER V_FILE TO V_APPPATH.
IF SY-SUBRC NE 0.
Display error message: "Data could not be written at the location"
MESSAGE 'Data could not be written at the location' TYPE 'I'.
EXIT.
ENDIF.
CLEAR V_FILE.
ENDLOOP.
CLOSE DATASET V_APPPATH.
IF SY-SUBRC NE 0.
Display error message: "File could not be closed"
MESSAGE 'File could not be closed' TYPE 'I'.
EXIT.
ELSE.
CONCATENATE 'Data Successfully downloaded to the Specified Location' V_APPPATH INTO MESSAGE1 SEPARATED BY SPACE.
MESSAGE MESSAGE1 TYPE 'S'.
ENDIF.
ENDFORM. " sub_download_appserverIt may be better to summarize what you do in the steps, thereby avoiding such a long coding posted here.
This may be helping experts to pick the wrong spot to fix it. -
URGENT!!! Java Gurus Please Help with adf issue!
PLEASE SEE MY LATEST POST BELOW TIMO'S RESPONSE. THE REQUIREMENT HAS CHANGED. THAT IS THE ISSUE I AM LOOKING A SOLUTION FOR.
Hello All,
We have a requirement where our adf/jsf app needs to pick an EXCEL file from the server where the application is deployed. The sequence is :
User comes to the page
Clicks on "Open EXCEL" button
EXCEL file located in the c:/ of the server opens up.
How can this be done? I do not see any coding needed because the EXCEL file is being opened as is (and after user views it he closes the file) and the data is not being transferred to the jspx page.
*We are totally flexible in how this is implemented - ie, using button, link , html etc etc. What ever works!!!!*
Thanks,
Edited by: user12054715 on Aug 17, 2010 8:54 PM
Edited by: user12054715 on Aug 18, 2010 4:11 PM
Edited by: user12054715 on Aug 18, 2010 4:13 PMHello Timo,
I am using 10.1.3g so your response is not going to help me.
However, I have another question that I have already posted on the Forum. Please help me...
Requirement:
*1. Java application should be able to write "Hello World" in the excel file, when the user opens it.*
I CAN DO THIS WITH THE FOLLOWING CODE:
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("newSheet");
HSSFRow row = sheet.createRow(1);
row.createCell(1).setCellValue("HelloWorld!!!!!!!!!");
*2. A "Write To Excel" button on jsf page opens a dialog asking user to Save or Open the excel file. (user can save the file anywhere on his machine)*
I CAN DO THIS WITH THE FOLLOWING CODE:
In jsf:
<af:commandButton text="Download" action="#{myBackingBean.writeToExcel}" useWindow="true"/>
In backing bean:
public static void writeToExcel() throws IOException
String filename = "workbook.xls";
// //Setup the output
String contentType = "application/vnd.ms-excel";
FacesContext fc = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
response.setHeader("Content-disposition", "attachment; filename=" + filename);
response.setContentType(contentType);
PrintWriter out = response.getWriter();
BOTTLENECK: When the user opens the excel how do I show "HelloWorld!!!!!!!!!" ? -
KM images retrieving in Applications ----Java gurus please help -- URGENT
Hi,
I am retrieving images from KM in the webdynpro application and then displaying Adobe Interactive Form with the help of the blog :
/people/bobu.georgeputheeckal/blog/2006/12/22/getting-an-image-from-km-documents-to-be-used-in-web-dynpro
But the images i could retreive are atmost 20kb , if the size of the image is more eg : 70kb , the image is not displaying . In the code of the blog :
//Reading the image file
BufferedInputStream bufIn =
new BufferedInputStream(resourceimg.getContent().getInputStream()); *
byte[] imagebyte = new byte[bufIn.available()];
bufIn.read(imagebyte);
Wile getting BufferedInputStream object from resource object ,,,,,,,if the size is say 70KB ,,,,it is giving problem .But if the size is less say 10KB it is ok .
Pls anyone provide me to overcome this problem and can get byte[] ,,, and can proceed further for larger images .
Thanks and Regards,
Srini
Edited by: srinivasa rao on Feb 20, 2008 6:39 PMSrinivas,
I think that's because the default filesize for BufferedInputStream class is 2048 bytes.
Change your code as follows and check if it resolves your issue:-
BufferedInputStream bufIn =
new BufferedInputStream(resourceimg.getContent().getInputStream(), Integer.MAX_VALUE);
byte[] imagebyte = new byte[bufIn.available()]; -
Im running examples of the include
<jsp:include page="xxx.jsp">
and received error:
org.apache.jasper.JasperException: No se puede compilar la clase para JSP
An error occurred at line: 17 in the jsp file: /jsp/include/include.jsp
Generated servlet error:
/Programas/Tomcat4/work/localhost/examples/jsp/include/include$jsp.java:79: Method include(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, javax.servlet.jsp.JspWriter, boolean) not found in class org.apache.jasper.runtime.JspRuntimeLibrary.
JspRuntimeLibrary.include(request, response, "/jsp/include/foo.html" + jspxqStr, out, true);
^Try these files on your setup.
simple_include.jsp
<%@ page language="java" %>
<%@ page import="java.sql.*"%>
<%@ page import="java.sql.Connection"%>
<%@ page import="java.sql.Statement"%>
<%@ page import="java.sql.ResultSet"%>
<%@ page import="java.sql.SQLException"%>
<jsp:include page="simple_top.jsp" flush="true" />
<%
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
String url = "jdbc:odbc:CafeJava";
String query = "select COF_NAME, PRICE from COFFEES";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
conn = DriverManager.getConnection(url, "Admin", "duke1");
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while (rs.next()) {
String s = rs.getString("COF_NAME");
float f = rs.getFloat("PRICE");
%>
<tr><td><%=s %></td><td><%=f %></td></tr>
<%
stmt.close();
conn.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
%>
<jsp:include page="simple_bottom.jsp" flush="true" />simple_top.jsp (this is just html named with a .jsp extension
<html>
<title>
Cafe Java
</title>
<head>
</head>
<body>
<h1>Welcome to Cafe Java!</h1>
<h2>Available Coffees:</h2>
<table>
<tr><th>Coffee</th><th>Price</th></tr>simple_bottom.jsp (ditto)
</table>
</body>
</html>This all assumes that you have the database demos in the jdk directory set up correctly on your machine and have played around with the Cafe Java files enough to have done the create coffees bit so that there are actually some values in the tables. If not you can open the file at:
C:\jdk1.3\demo\jfc\DBDemos\JavaDB\CAFEJAVA.MDB directly and create and populate the tables, being sure to name the columns as they are in the jsp files.
In the immortal words of Catbert, "it runs fine on my machine."
Edward -
URGENT HELP, PEANUTS FOR THE EXCEL GURUS
I have a table, where Column1 is of the ages of students, Column 2 is of their test results. i want to fin the average score of students between ages say 18- 30. Please help
with a formula.You can do it in several ways.
The direct approach is to use
AVERAGEIF.
Another approach is to use PivotTable:
1- Select a cell in one of your columns.
2- Click Insert->PivotTable, and click OK in the PivotTable dialog.
3- Drag Age column to ROWS and Grade column to VALUES.
4- Change calculation of grade from Sum to Average.
5- Use the filter on age column to select the desired age, or use the Grouping feature (right click on any age cell, and select Group) to define the age groups you need.
Maybe you are looking for
-
Hello I recently started working on a video project using .mpg format videos. I have already completed another project successfully using the same format and videos from the same source. However, when I went to open this current project, the program
-
Dear i have problem in Poe port i have Access point TP link tl-wa5110g High Power when i bluged in switch i can`t take power from switch note Acess point support Poe in put power 12V 1 A thanks..
-
Hi all I'm just a beginner so if the below question seems easy, apologies but i'm struggling with it! I have a #footer which is 908px wide x 100px high, im trying to put 20px of white space above the footer in between the main image. So i have the fo
-
Call Master_idoc_distribute for collective outbound idocs
Hi All, I want to process outbound idocs (4 idocs collectively) using master_idoc_distribute FM. I am calling master_idoc_distribute inside a FM and assigned it to process code outbound. It is working for one idoc but not for 4 idocs. How can i call
-
Punch hole without compound path?
I have a shape where I then need to punch a hole in that shape. If I do that it then creates a compound path. The problem is I am want to use the Area Type Tool to then paste some text within the shape - but it won't allow me to do that as you can't