OUTPUT REPROCESSING - urgent
hi All
is there a way to set a indicartor in the SAP side to tell the ASN IDOC has been resend and not orginal?
The customer wants that if the ASN idoc is sent again the customer would want to know that its not an origianl ASN instead its a copy of the ASN sent earlier.
any idea how to achieve this?
~Suresh
When you resend just pass indicator in control record.
How to find whether it is resend-->Check Nast-VSTAT(1-Successfully processed) entry if output type is already processed. Mark second idoc as mentioned.
I normally use EDIDC-SNDSAD-Copy(Indicator) or duplicate.
Thanks,
Narayanan
Similar Messages
-
Report select options similar to Query output options : Urgent !!!!!
Hi All,
I have developed a custom report . The output options of this report needs to be included in Selection screen like in SQ01 queries, there should be option to output the report results in different formats like List Viewer, ABAP List, Spread Sheet etc.,.
If some variant is selected then user will select whatever the format he want .
the output should display in that format .
How I can acomodate all these options to output a report .
How can I do this ..Pls help me its Urgent !!!!
Points for Sure !!!
Regards,
VarmaHi,
Try this code,
at user-command.
case sy-ucomm.
when 'disp'.
write:....... "abap list
when 'buton1'
call function 'reuse_alv_list_display'.
endcase.
i hope it gives ur answer
Reward if it helps. -
Output determination ----Urgent
Hi , I got a problem regarding Output determination in SD.
There is credit memo , created based on an invoice. When iam taking the "Print preview " at the header level of the credit memo, " the Reference no./Date "
is not showing anything.
When Iam checking the "Edit" button at the header level and then clicking on the "Processing Log", it is showing the following information:
1. Object 0062000080
2. Output type: Order Confirmation
3. Processing log for program RVADOR01 routine ENTRY
4. Appl. V1 - Problem during data retrieval -
Table/structure VBAK
5. Window TITLE is not defined for form RVORDER01
6. Element HEADER_DATA window MAIN is not defined
for form RVORDER01
7. Element HEADER_TEXT window MAIN is not defined for
form RVORDER01
So, plz help me resolve this issue . What is the error and how to resolve this error?? Its an urgent case
Thanks with regards
Sourav BhaumikDear Sourav,
Chect the output type program RVADOR01 with the help of the ABAPer then debug the program then you can come to know what is the exact problem.
-->Before you Check the output determination assignment to the Creditmemo and output type assignment.
I hope it will help you
Regards,
Murali.
Edited by: Murali Mohan.T on Mar 31, 2008 8:34 AM -
Problem with output type--urgent
Hi experts,
My requirement is i need to post a vendor lkiability. For that we create a output type 'ZALV'. We also created a report program . In nace we attached the program and output type with medium '8'. we call the same subroutine Entry which available in standard program (CMSR_OUTPUT_ENTRY whcich is attched to medium 8 and o/p type:CMSF). Up to this one my output type works fine and processed successfully.In that Entry some function modules called.
When i added my own code in report program it gives a error
saying that ' POSTING_ILLEGAL_STATEMENT".
Statement "CALL SCREEN" is not allowed in this form.
There is probably an error in the program
"SAPLTAX1".
This program is triggered in the update task. There,
following ABAP/4 statements are not allowed:
- CALL SCREEN
- CALL DIALOG
- CALL TRANSACTION
- SUBMIT
In my code i am not used these statements also.
The error in code is:PERFORM skftabn_ergaenzen.
xbset-first = 1.
xkzinc = space.
IF bkpf-xmwst = 'X'.
ok-code = 'CALC'.
IF bkpf-xsnet = space.
xkzinc = 'X'.
ENDIF.
ELSE.
ok-code = 'PRUF'.
ENDIF.
IF i_xsimu NE 'S'.
xnodia = 'X'.
ELSE.
xnodia = space.
ok-code = 'SHOW'.
ENDIF.
Bild dunkel prozessieren -
evtl. veraenderte Steuern merken
IF xusvr = 'X'.
PERFORM ustaxes_detail USING i_bkpf.
ELSE.
IF sy-tcode(1) = 'M'
or bkpf-tcode(1) = 'M'.
OR bkpf-tcode(1) = 'M' OR NOT dynpro_501 IS INITIAL.
CALL SCREEN 301.
ELSE.
CALL SCREEN 300.
ENDIF.
ENDIF.
ok-code = space.
Please give me a solution --- It is very urgent.
Regards
Pratap.MHi ,
Use this one . These are standarrd includes you need to include.
INCLUDE riprid01. " General DATA and TABLE struct.
INCLUDE riprif01. " General PRINT routines
PERFORM print_paper.
Main Form which is called.
FORM print_paper.
Import Data ---Copied From SAP Program
PERFORM data_import. * This you have to copy from standard SAP program
*&-- Populate internal table for header part of form.
PERFORM data_population.
Your scrpit printing logic will be done in this.
*&--Script printing.
PERFORM main_print. " Print the PAPER now
Do reward.
Thanks,
Madhura -
RFCHKE00 program output formatting - Urgent
Hello Friends,
I am working on the Positive payments - Outgoing payments to Banks. The standard SAP program is doing the Check extract for the same. If I run the transaction code FCHX, then this transaction is using the program RFCCHKE00 to produce the output file from SAP. The format of the output file does not match the Bank format and so I've to reformat the output file to the bank format before transferring the data to the respective banks.
Could anybody tell me how to reformat the output file programattically? Shd I write an ABAP for this or what should I do? If I've to write an ABAP then could somebody help me with the program?. Please advise.
This is very urgent please.
Thanks in Advance.check below program which was written for the same purpose in one of our client.
<b>AWARD Points</b>
REPORT zfo_positive_pay LINE-SIZE 120
LINE-COUNT 60
MESSAGE-ID zf_cd.
====================== T A B L E S =======================
TABLES: t001, "Company Codes
t012, "House Banks
tcurc, "Currency Codes
payr, "Payment data
dfkkcr. "Repository For Checks
====================== T Y P E S =======================
TYPES: BEGIN OF ty_boa_format,
acc_num(10) TYPE c,
void_ind(1) TYPE c,
filler(2) TYPE c,
s_no(10) TYPE c,
amount(12) TYPE c,
add_data(45) TYPE c,
END OF ty_boa_format.
TYPES: BEGIN OF ty_boa_detail_format,
acc_num(10) TYPE c,
void_ind(1) TYPE c,
filler(2) TYPE c,
s_no(10) TYPE c,
amount(12) TYPE c,
iss_date(8) TYPE c,
add_data(37) TYPE c,
END OF ty_boa_detail_format.
========= I N T E R N A L T A B L E S ==============
DATA BEGIN OF it_sap_format OCCURS 0.
INCLUDE STRUCTURE dtachkp.
DATA END OF it_sap_format.
DATA: it_boa_format TYPE STANDARD TABLE OF ty_boa_format
WITH HEADER LINE,
it_boa_detail_format TYPE STANDARD TABLE OF ty_boa_detail_format
WITH HEADER LINE.
internal tables to send E-mail
DATA: st_doc_chng LIKE sodocchgi1,
"Data of an object which can be changed
it_objtxt LIKE STANDARD TABLE OF solisti1 ,
"SAPoffice: Single List with Column Length 255
wa_objtxt LIKE LINE OF it_objtxt,
it_objpack LIKE STANDARD TABLE OF sopcklsti1 ,
"SAPoffice: Description of Imported Object Components
wa_objpack LIKE LINE OF it_objpack,
it_objhead LIKE STANDARD TABLE OF solisti1 ,
"SAPoffice: Single List with Column Length 255
wa_objhead LIKE LINE OF it_objhead,
it_reclist LIKE STANDARD TABLE OF somlreci1 ,
"SAPoffice: Structure of the API Recipient List
wa_reclist LIKE LINE OF it_reclist,
it_objbin LIKE STANDARD TABLE OF solisti1,
"SAPoffice: Single List with Column Length 255
wa_objbin LIKE LINE OF it_objbin.
========= C O N S T A N T S ==============
CONSTANTS c_flag TYPE c VALUE 'X'.
========= V A R I A B L E S ==============
DATA: w_flag TYPE c,
w_str(70) TYPE c, " To store E-Amil contents
w_tab_lines TYPE sy-tabix.
========== S E L E C T I O N S C R E E N =============
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
SELECTION-SCREEN: SKIP.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p_bukrs LIKE payr-zbukr OBLIGATORY DEFAULT '2580',
p_hbkid LIKE payr-hbkid OBLIGATORY DEFAULT 'BOAUS',
p_waers LIKE payr-waers OBLIGATORY DEFAULT 'USD'.
SELECT-OPTIONS: s_erdat FOR dfkkcr-erdat OBLIGATORY.
"DEFAULT SY-DATUM.
SELECT-OPTIONS: s_voidr FOR payr-voidr.
SELECTION-SCREEN: END OF BLOCK b2.
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME.
PARAMETERS: p_sfile LIKE rlgrap-filename OBLIGATORY,
p_opath LIKE rlgrap-filename OBLIGATORY,
p_ofile LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b3.
SELECTION-SCREEN: END OF BLOCK b1.
============ I N I T I L I Z A T I O N =============
data : w_bukrs like payr-zbukr.
INITIALIZATION.
DATA: l_path1 LIKE rlgrap-filename VALUE '/global/data/transfer/',
l_path2 LIKE rlgrap-filename VALUE '/3302/pub/out/'.
CONCATENATE l_path1 sy-sysid l_path2 INTO p_opath.
============ A T S E L E C T I O N S C R E E N =============
AT SELECTION-SCREEN.
*---to Validate the entered Company code
PERFORM to_validate_bukrs.
*---to Validate the entered house bank
PERFORM to_validate_hbkid.
*---to Validate the entered currency
PERFORM to_validate_waers.
AT SELECTION-SCREEN OUTPUT.
*--- to populate the default file names if the entered company code and
*--- house bank id are valid
PERFORM to_populate_default_file_names.
============ S T A R T O F S E L E C T I O N =============
START-OF-SELECTION.
*---checking of file CD_POS_COMPLETE for existence
PERFORM CHECK_FILES.
*--- to submit the report RFCHKE00
PERFORM submit_rfchke00.
*--- to open the unix file and download the data
PERFORM open_unix_file_and_process.
*--- to convert the sapfile format to the required BOA format
PERFORM sap_format_to_boa_format.
============= E N D O F S E L E C T I O N ===============
END-OF-SELECTION.
*If entered file exists in the Unix directory
IF w_flag = ' '.
*--- process the boa internal table to generate the trailer records for
*--- every new account number
PERFORM process_boa_for_trailer_record.
*--- upload data to the unix file which contains the required BOA format
PERFORM upload_unix_file.
*---addition of files into server
PERFORM ADD_FILES.
*-----Send a E-Mail to the user
PERFORM send_email.
ENDIF.
=================== S U B R O U T I N E S ==================
*& Form to_validate_bukrs
to validate the entered company code at the selection screen
FORM to_validate_bukrs .
IF NOT p_bukrs IS INITIAL.
SELECT SINGLE bukrs
FROM t001
INTO t001-bukrs
WHERE bukrs EQ p_bukrs.
IF sy-subrc NE 0.
MESSAGE e004 WITH text-e01.
STOP.
ENDIF.
ELSE.
MESSAGE e004 WITH text-e00.
ENDIF.
ENDFORM. " to_validate_bukrs
*& Form to_validate_hbkid
to validate the entered house bank id at the selection screen
FORM to_validate_hbkid .
IF NOT p_hbkid IS INITIAL.
SELECT SINGLE hbkid
FROM t012
INTO t012-hbkid
WHERE hbkid EQ p_hbkid.
IF sy-subrc NE 0.
MESSAGE e004 WITH text-e02.
STOP.
ENDIF.
ELSE.
MESSAGE e004 WITH text-e00.
ENDIF.
ENDFORM. " to_validate_hbkid
*& Form to_validate_waers
to validate the entered cCurrency at the selection screen
FORM to_validate_waers .
IF NOT p_waers IS INITIAL.
SELECT SINGLE waers
FROM tcurc
INTO tcurc-waers
WHERE waers EQ p_waers.
IF sy-subrc NE 0.
MESSAGE e004 WITH text-e03.
STOP.
ENDIF.
ELSE.
MESSAGE e004 WITH text-e00.
ENDIF.
ENDFORM. " to_validate_waers
*& Form to_populate_default_file_names
to disable the file name fields and to populate the default values
into it
FORM to_populate_default_file_names .
DATA: l_date LIKE sy-datum.
l_date = sy-datum.
IF p_sfile IS INITIAL or w_bukrs <> p_bukrs.
*--- move the entered company code, house bank id and todays
*--- date to the sap file name
CONCATENATE '/tmp/FI_' p_bukrs p_hbkid p_waers sy-datum
INTO p_sfile.
ENDIF.
IF p_ofile IS INITIAL or w_bukrs <> p_bukrs.
CONCATENATE '3302-BA-03-'
l_date '-' sy-uzeit '-' p_bukrs '-out'
INTO p_ofile.
ENDIF.
w_bukrs = p_bukrs.
ENDFORM. " to_populate_default_file_names
*& Form open_unix_file_and_process
opne the unix file and download data to internal table
FORM open_unix_file_and_process .
DATA : l_msg(80) TYPE c.
CLEAR w_flag.
open the file in text mode
OPEN DATASET p_sfile FOR INPUT
IN TEXT MODE
MESSAGE l_msg
ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE s004 WITH l_msg '-' p_sfile.
w_flag = 'X'.
STOP.
ENDIF.
move the downloaded file data record wise to the internal table
till it reaches to the last record
DO.
READ DATASET p_sfile INTO it_sap_format.
IF sy-subrc = 0.
APPEND it_sap_format.
ELSE.
cursor reached to the last record of the file
EXIT.
ENDIF.
ENDDO.
remove the header record form the downloaded file data
DELETE it_sap_format INDEX 1.
remove the dataset file created by sap standard program
DELETE DATASET p_sfile.
close the opened file
CLOSE DATASET p_sfile.
ENDFORM. " open_unix_file_and_process
*& Form sap_format_to_boa_format
to convert the sap generated file format to the required Bank Of
America format
FORM sap_format_to_boa_format .
DATA: l_amount(10),
l_decimal(2),
l_payee2 LIKE payr-znme2.
LOOP AT it_sap_format.
WRITE it_sap_format-bankn TO it_boa_detail_format-acc_num
RIGHT-JUSTIFIED.
UNPACK it_boa_detail_format-acc_num TO it_boa_detail_format-acc_num.
IF NOT it_sap_format-voidr IS INITIAL.
it_boa_detail_format-void_ind = '2'.
ELSE.
CLEAR it_boa_detail_format-void_ind.
ENDIF.
it_boa_detail_format-filler = space.
WRITE it_sap_format-chect TO it_boa_detail_format-s_no
RIGHT-JUSTIFIED.
UNPACK it_boa_detail_format-s_no TO it_boa_detail_format-s_no.
WRITE it_sap_format-amnt+6(9) TO l_amount.
WRITE it_sap_format-decm+0(2) TO l_decimal.
CONCATENATE '0' l_amount l_decimal INTO it_boa_detail_format-amount.
it_boa_detail_format-iss_date = it_sap_format-zaldt.
*addition of payee2 field in version2.
CLEAR l_payee2.
SELECT SINGLE znme2
INTO l_payee2
FROM payr
WHERE zbukr = p_bukrs AND
hbkid = p_hbkid AND
chect = it_sap_format-chect.
*payee1 and payee2 separated by # symbol.
it_boa_detail_format-add_data+0(20) = it_sap_format-znme1.
it_boa_detail_format-add_data+20(1) = '#'.
it_boa_detail_format-add_data+21(16) = l_payee2.
*if payee1 is initial , then condenses the name
CONDENSE it_boa_detail_format-add_data.
APPEND it_boa_detail_format.
ENDLOOP.
CLEAR it_boa_detail_format.
ENDFORM. " sap_format_to_boa_format
*& Form process_boa_for_trailer_record
to generate the trailer record for every new account number
FORM process_boa_for_trailer_record .
DATA: l_cnt TYPE i,
l_amt(12) TYPE p DECIMALS 2,
l_temp(12).
*--- sort the table on account number
SORT it_boa_detail_format BY acc_num.
LOOP AT it_boa_detail_format.
to get the item line count and the total
if it_boa_detail_format-void_ind <> '2'.
l_cnt = l_cnt + 1.
l_amt = l_amt + it_boa_detail_format-amount.
endif.
it_boa_format-acc_num = it_boa_detail_format-acc_num.
it_boa_format-void_ind = it_boa_detail_format-void_ind.
it_boa_format-filler = it_boa_detail_format-filler.
it_boa_format-s_no = it_boa_detail_format-s_no.
it_boa_format-amount = it_boa_detail_format-amount.
it_boa_format-add_data+0(8) = it_boa_detail_format-iss_date.
it_boa_format-add_data+8(37) = it_boa_detail_format-add_data.
APPEND it_boa_format.
CLEAR it_boa_format.
for the new bank account number
AT END OF acc_num.
it_boa_format-acc_num = it_boa_detail_format-acc_num.
it_boa_format-void_ind = 'T'.
it_boa_format-filler = ''.
it_boa_format-s_no = l_cnt.
*-- unpack is used to add leading zeros
UNPACK it_boa_format-s_no TO it_boa_format-s_no.
l_amt = l_amt / 100.
UNPACK l_amt TO it_boa_format-amount.
l_temp = it_boa_format-amount.
*-- Changes as per BOA - no decimals requried ,instead put a 0
*-- in the start
CLEAR it_boa_format-amount.
it_boa_format-amount+0(01) = '0'. "Zero at the start
it_boa_format-amount1(9) = l_temp1(9). "9 digits whole amt
it_boa_format-amount10(2) = l_temp10(2). "2 decimals amt
UNPACK it_boa_format-add_data TO it_boa_format-add_data.
APPEND it_boa_format.
CLEAR: l_cnt,
l_amt,
l_temp,
it_boa_format.
ENDAT.
ENDLOOP.
ENDFORM. " process_boa_for_trailer_record
*& Form upload_unix_file
create unix file with the required BOA format
FORM upload_unix_file .
DATA l_msg(80) TYPE c.
opne the unix file
CONCATENATE p_opath p_ofile INTO p_ofile.
OPEN DATASET p_ofile FOR OUTPUT
IN TEXT MODE
MESSAGE l_msg
ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE i004 WITH l_msg.
EXIT.
ENDIF.
move the data from internal table to unix file
LOOP AT it_boa_format.
TRANSFER it_boa_format TO p_ofile.
ENDLOOP.
message about number of records downloaded
IF sy-subrc EQ 0.
MESSAGE s004 WITH
sy-tfill 'records downloaded to the file'
p_ofile.
ENDIF.
close file
CLOSE DATASET p_ofile.
ENDFORM. " upload_unix_file
*& Form submit_rfchke00
to submit the standard program RFCHKE00 to extract the checks
for the given company code, House bank and currecncy
FORM submit_rfchke00 .
SUBMIT rfchke00 WITH par_zbuk EQ p_bukrs
WITH par_hbki EQ p_hbkid
WITH par_waer EQ p_waers
WITH par_xneu EQ c_flag
WITH sel_zald IN s_erdat
WITH par_file EQ p_sfile
WITH par_dbup EQ c_flag
WITH sel_void IN s_voidr
AND RETURN.
IF sy-subrc NE 0.
MESSAGE i004 WITH text-e04.
EXIT.
ENDIF.
ENDFORM. " submit_rfchke00
*& Form send_email
sends an email in the required format
FORM send_email .
Populate the Mail contents
PERFORM populate_email_ref_data.
Populate the attachment data
PERFORM pop_data_objbin.
CLEAR w_tab_lines.
DESCRIBE TABLE it_objbin LINES w_tab_lines.
wa_objhead = text-021.
APPEND wa_objhead TO it_objhead.
Creation of the entry
wa_objpack-transf_bin = 'X'.
wa_objpack-head_start = 0.
wa_objpack-head_num = 0.
wa_objpack-body_start = 0.
wa_objpack-body_num = w_tab_lines.
wa_objpack-doc_type = 'txt'.
wa_objpack-obj_name = 'POS pay-FI'.
wa_objpack-obj_descr = text-022.
wa_objpack-doc_size = w_tab_lines * 255.
APPEND wa_objpack TO it_objpack.
Populate the User mail ids from the distribution list
PERFORM receiver_details.
ENDFORM. " send_email
*& Form POPULATE_EMAIL_REF_DATA
Subroutine to set the Attachment file name ,Mail subject,
Body of the mail and size of the mail
FORM populate_email_ref_data .
Setting up attachment file name
st_doc_chng-obj_name = text-t02.
Setting up mail subject
st_doc_chng-obj_descr = text-t03.
st_doc_chng-sensitivty = 'P'.
*Seting up the body of the E-mail
wa_objtxt = text-t04.
APPEND wa_objtxt TO it_objtxt.
DESCRIBE TABLE it_objtxt LINES w_tab_lines.
READ TABLE it_objtxt INTO wa_objtxt INDEX w_tab_lines.
*Finding size of the E-mail
st_doc_chng-doc_size = ( w_tab_lines - 1 ) * 255 + STRLEN( wa_objtxt ).
Creation of the entry for the compressed document
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = w_tab_lines.
wa_objpack-doc_type = 'RAW'.
APPEND wa_objpack TO it_objpack.
ENDFORM. " POPULATE_EMAIL_REF_DATA
*& Form POP_DATA_OBJBIN
Subroutine to populate the contennts of the attached document
FORM pop_data_objbin .
DATA : l_date LIKE sy-datum.
l_date = sy-datum - 1.
Populating the message
CLEAR w_str.
CONCATENATE text-t06 l_date INTO w_str SEPARATED BY space.
MOVE w_str TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
WRITE TEXT-T07 TO W_STR+01(64). "Message
MOVE W_STR TO WA_OBJBIN-LINE.
CONCATENATE CL_ABAP_CHAR_UTILITIES=>CR_LF W_STR INTO W_STR.
WA_OBJBIN-LINE = W_STR.
APPEND WA_OBJBIN TO IT_OBJBIN.
CLEAR W_STR.
CLEAR WA_OBJBIN.
WRITE TEXT-T06 TO W_STR.
MOVE W_STR TO WA_OBJBIN-LINE.
CONCATENATE CL_ABAP_CHAR_UTILITIES=>CR_LF W_STR INTO W_STR.
WA_OBJBIN-LINE = W_STR.
APPEND WA_OBJBIN TO IT_OBJBIN.
CLEAR: W_STR,
WA_OBJBIN.
*for Company Code and House Bank
CONCATENATE text-t08 p_bukrs INTO w_str SEPARATED BY space.
CONCATENATE w_str text-t09 INTO w_str.
CONCATENATE w_str p_hbkid INTO w_str SEPARATED BY space.
MOVE w_str TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
WRITE text-t07 TO w_str+0(62).
MOVE w_str TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
Processing output records to send email in attachment
LOOP AT it_boa_format.
PERFORM cheque_records_to_objbin.
ENDLOOP.
IF it_objbin[] IS INITIAL.
MOVE 'No data in Positive Payfile for FI' TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
ENDIF.
ENDFORM. " POP_DATA_OBJBIN
*& Form CHEQUE_RECORDS_TO_OBJBIN
Subroutine to populate the output data in attachment
FORM cheque_records_to_objbin .
DATA: l_bank_acc_no(10),
l_check_no(10),
l_amount(12),
l_paid_date(8),
l_status(1).
l_bank_acc_no = it_boa_format-acc_num.
l_check_no = it_boa_format-s_no.
l_amount = it_boa_format-amount.
l_paid_date = it_boa_format-add_data+0(8).
l_status = it_boa_format-void_ind.
Display only summarised records in Email
IF it_boa_format+10(1) = 'T'.
WRITE text-t05 TO w_str+01(80).
MOVE w_str TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
WRITE l_bank_acc_no TO w_str+0(18).
WRITE l_check_no TO w_str+18(12).
WRITE l_amount TO w_str+30(14).
MOVE w_str TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
WRITE text-t05 TO w_str+01(80).
MOVE w_str TO wa_objbin-line.
CONCATENATE cl_abap_char_utilities=>cr_lf w_str INTO w_str.
wa_objbin-line = w_str.
APPEND wa_objbin TO it_objbin.
CLEAR w_str.
CLEAR wa_objbin.
ELSE.
for detail records
WRITE L_BANK_ACC_NO TO W_STR+0(18).
WRITE L_CHECK_NO TO W_STR+18(12).
WRITE L_AMOUNT TO W_STR+30(14).
WRITE L_PAID_DATE TO W_STR+44(12).
WRITE L_STATUS TO W_STR+56(1).
MOVE W_STR TO WA_OBJBIN-LINE.
CONCATENATE CL_ABAP_CHAR_UTILITIES=>CR_LF W_STR INTO W_STR.
WA_OBJBIN-LINE = W_STR.
APPEND WA_OBJBIN TO IT_OBJBIN.
ENDIF.
CLEAR: w_str,
wa_objbin.
ENDFORM. " CHEQUE_RECORDS_TO_OBJBIN
*& Form RECEIVER_DETAILS
Subroutine to populate the receiver details
FORM receiver_details .
wa_reclist-receiver = text-t10. "'[email protected]'.
wa_reclist-rec_type = 'U'.
APPEND wa_reclist TO it_reclist.
CLEAR wa_reclist.
*-- Sending the email with attached document
PERFORM call_email_function.
ENDFORM. " RECEIVER_DETAILS
*& Form CALL_EMAIL_FUNCTION
text
FORM call_email_function .
Call function to send email
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = st_doc_chng
commit_work = 'X'
put_in_outbox = 'X'
importing
sent_to_all = sent_to_all
TABLES
packing_list = it_objpack
object_header = it_objhead
contents_bin = it_objbin
contents_txt = it_objtxt
receivers = it_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
CASE sy-subrc.
WHEN 1.
*message e004.
WHEN 2.
*message e005.
WHEN 3.
*message e006.
WHEN 0.
SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
*leave program.
SET SCREEN 0.
MESSAGE s004(zf_cd) WITH text-012 ' ' text-t10.
ENDCASE.
ENDFORM. " CALL_EMAIL_FUNCTION
*& Form CHECK_FILES
Perform used to check whether FI_POS_COMPLETE file exists on the
server
form CHECK_FILES .
DATA : L_MSG(80) TYPE C,
L_FILE LIKE RLGRAP-FILENAME.
CLEAR : L_FILE.
CONCATENATE P_OPATH 'FI_POS_COMPLETE_' P_BUKRS INTO L_FILE.
OPEN DATASET L_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
CLOSE DATASET L_FILE.
MESSAGE E054.
ELSE.
CLOSE DATASET L_FILE.
ENDIF.
endform. " CHECK_FILES
*& Form ADD_FILES
Perform used to create the FI_POS_COMPLETE file on the server with a 0
byte record
form ADD_FILES .
DATA : L_MSG(80) TYPE C,
L_FILE LIKE RLGRAP-FILENAME.
CLEAR : L_FILE.
CONCATENATE P_OPATH 'FI_POS_COMPLETE_' P_BUKRS INTO L_FILE.
OPEN DATASET L_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
TRANSFER SPACE TO L_FILE.
ELSE.
MESSAGE I055.
ENDIF.
CLOSE DATASET L_FILE.
endform. " ADD_FILES -
Hi frnds,
i have modified a standard report to 'z' report.the output comes as like
standard abap list. when i execute the report in foreground and saves the output
in spreadsheet its fine but when i execute it in background the output is messed up.(excel)
the background needs to be executed in sm37 and spool request is created then we
can see the file type and its output.(sp01).
a standard program is attached in that report-RSBTCHH0 from where its takes
the output in excel.
Hoe to mail funcitionality to this report
help me where to make the changes..
REPORT ZFCHKN00
LINE-COUNT (1)
LINE-SIZE 171
NO STANDARD PAGE HEADING
MESSAGE-ID FS.
TABLES:
AUTHA,
BHDGD, "Batch-Heading
BNKA, "Bankdaten
BKPF, "Accounting document header
PAYR, "Scheckdatei
RFSDO, "Select-Options
T001, "für das Land des Buchungskreises
T005, "für den Bankschlüsseltyp im Land
T012, "Banken
T012K, "Bankenkonten
T042Z, "Name des Zahlweges
TCURX, "Nachkommastellen
TVOIT, "Grund ungültiger Scheck, Text
BSAK, "Accounting: Secondary index for vendors (cleared items)
BSEG, "Accounting document segment
REGUH. "Payment data from payment progra
RANGES:
SEL_LAUD FOR PAYR-LAUFD,
SEL_LAUI FOR PAYR-LAUFI,
SEL_XDAT FOR PAYR-EXTRD,
SEL_XTIM FOR PAYR-EXTRT,
SEL_ECHT FOR PAYR-VOIDR,
TAB_RZAWE FOR PAYR-RZAWE.
INCLUDE RFEPOSC1. "Tabelle POSTAB für Rechnungsinfo
DATA:
FLG_INTENSIV(1) TYPE N, "1 - Color intensiv (Streifen)
FLG_POSTEN(1) TYPE N, "1 - Rechnungsposten selektiert
FLG_SUMME(1) TYPE N, "1 - Summe der EPs möglich
HLP_DATUM(10) TYPE C, "aufbereitetes Datum
HLP_VON/BIS(27) TYPE C, "von Nummer bis Nummer
HLP_SUBRC LIKE SY-SUBRC, "Returncode
HLP_WAERS LIKE POSTAB-WAERS, "Währung der EPs
SUM_WRSHB LIKE POSTAB-WRSHB,
SUM_ABZUG LIKE POSTAB-WSKTO, "Summen für die Rechnungssumme
SUM_NETTO LIKE POSTAB-WRSHB,
TXT_ZEILE(132) TYPE C, "Textzeile SYALLA asr 11456
TXT_ZEILE(171) TYPE C, "Textzeile SYALLA asr 11456
BEGIN OF TAB_SUMME OCCURS 10, "pro Zahlweg Summe je Währung
WAERS LIKE PAYR-WAERS,
RWBTR LIKE PAYR-RWBTR,
Inserted By Jassi on 04/14/04 - ASR# 23240
DISER LIKE PAYR-RWBTR, "Discount Earned Total
DISTA LIKE PAYR-RWBTR, "Discount Taken Total
DISLO LIKE PAYR-RWBTR, "Discount Lost Total
END OF TAB_SUMME,
BEGIN OF TAB_LAUFK OCCURS 1.
INCLUDE STRUCTURE ILAUFK.
DATA: END OF TAB_LAUFK,
BEGIN OF MIKLINE, "Feldleiste zur Aufnahem des
ZBUKR LIKE PAYR-ZBUKR, "variablen Teils der Mikro-Fiche-
HBKID LIKE PAYR-HBKID, "Zeile
HKTID LIKE PAYR-HKTID,
RZAWE LIKE PAYR-RZAWE,
CHECF LIKE PAYR-CHECF,
END OF MIKLINE.
DATA: FLAG TYPE C VALUE '0'.
DATA: DISAM TYPE P DECIMALS 5,
DAYS_1 TYPE I,
DAYS_2 TYPE I,
PERC_1 TYPE P DECIMALS 3,
PERC_2 TYPE P DECIMALS 3,
DAYS_PAID TYPE I,
DISER TYPE P DECIMALS 5,
DISTA TYPE P DECIMALS 2,
DISTOT(17),
DISLO TYPE P DECIMALS 2.
ASR # 8269 RKSHARMA----
DATA: BVORG1 LIKE BKPF-BVORG,
BVORG2 LIKE BKPF-BVORG,
BUKRS1 LIKE BKPF-BUKRS,
BUKRS2 LIKE BKPF-BUKRS,
BELNR1 LIKE BKPF-BELNR,
BELNR2 LIKE BKPF-BELNR,
BELNR3 LIKE BKPF-BELNR,
HKONT1 LIKE BSEG-HKONT,
SHKZG1 LIKE BSEG-SHKZG,
DMBTR1 LIKE BSEG-DMBTR.
FIELD-GROUPS:
HEADER,
ZAHLUNG, "means Payment
RECHNUNG. "means Calculation
INSERT
PAYR-HBKID
PAYR-HKTID
PAYR-XMANU
PAYR-RZAWE
PAYR-CHECT
POSTAB-BUKRS
POSTAB-GJAHR
POSTAB-BELNR
INTO HEADER.
INSERT
PAYR
INTO ZAHLUNG.
INSERT
POSTAB
INTO RECHNUNG.
Selektionsparameter *
INCLUDE: RFCHKI99, RFDBRMAC.
PARAMETERS: "Zahlender Buchungskreis
PAR_ZBUK LIKE PAYR-ZBUKR MEMORY ID BUK.
SELECT-OPTIONS:
SEL_HBKI FOR PAYR-HBKID, "Hausbank (Kurzschlüssel)
SEL_HKTI FOR PAYR-HKTID. "Kontenverbindung (Kurzschlüssel)
PARAMETERS: "Personalabrechnungsschecks
PAR_XPER LIKE RFPDO2-CHKNXPER MEMORY ID XHR.
SELECTION-SCREEN SKIP.
BEGIN_OF_BLOCK 0.
SELECT-OPTIONS:
SEL_BNKL FOR T012-BANKL NO-EXTENSION,"Bankleitzahl
SEL_BNKN FOR T012K-BANKN NO-EXTENSION."Bankkonto
SELECT_OPTION_SCHECK.
SELECT-OPTIONS:
SEL_WAER FOR PAYR-WAERS, "Währungsschlüssel
SEL_RWBT FOR PAYR-RWBTR. "Betrag
END_OF_BLOCK 0.
BEGIN_OF_BLOCK 1.
SELECT-OPTIONS:
SEL_ZALD FOR RFSDO-CHKLADAT, "Ausstellungsdatum
SEL_CPUD FOR RFSDO-CHKLEDAT, "Erstellungsdatum
S_BUDAT FOR BKPF-BUDAT,
SEL_BNCD FOR PAYR-BANCD, "Einlösedatum
SEL_USER FOR RFSDO-CHKLUSER, "Scheckaussteller
SEL_VBLN FOR PAYR-VBLNR, "Zahlungsbelegnummer
SEL_PERN FOR PAYR-PERNR, "Personalnummer
SEL_VOID FOR PAYR-VOIDR. "Ungültigkeitsgrund
SELECTION-SCREEN:
BEGIN OF LINE,
COMMENT 01(31) TEXT-015 FOR FIELD ZW_LAUFD.
PARAMETERS:
ZW_LAUFD LIKE PAYR-LAUFD, "Laufdatum
ZW_LAUFI LIKE PAYR-LAUFI, "Laufidentifikation
ZW_XVORL LIKE REGUH-XVORL NO-DISPLAY."Vorschlagslauf
SELECTION-SCREEN:
END OF LINE,
BEGIN OF LINE,
COMMENT 01(31) TEXT-016 FOR FIELD PAR_XDAT.
PARAMETERS:
PAR_XDAT LIKE PAYR-EXTRD, "Extraktdatum
PAR_XTIM LIKE PAYR-EXTRT. "Extraktuhrzeit
SELECTION-SCREEN END OF LINE.
END_OF_BLOCK 1.
BEGIN_OF_BLOCK 2.
PARAMETERS:
PAR_XAUS LIKE RFPDO1-CHKNXAUS, "Scheckaußenstandsliste
PAR_EPOS LIKE RFPDO-CHKNEPOS, "Gezahlte Posten
PAR_LSEP LIKE RFPDO-ALLGLSEP, "Listseparation
PAR_MIKF LIKE RFPDO-ALLGMIKF, "Mikro-Fiche-Information
PAR_LINE LIKE RFPDO1-ALLGLINE. "Zusatzüberschrift
END_OF_BLOCK 2.
Buchungskreis vorbelegen *
INITIALIZATION.
GET_FRAME_TITLE: 0,1,2.
GET_TEXT: 0,1.
IF PAR_XTIM IS INITIAL.
SHIFT PAR_XTIM BY 6 PLACES.
ENDIF.
REFRESH TAB_LAUFK.
TAB_LAUFK-LAUFK = 'W'.
TAB_LAUFK-SIGN = 'E'.
APPEND TAB_LAUFK.
F4 für den Zahllauf *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ZW_LAUFD.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F2NME = 'ZW_LAUFI'
IMPORTING
LAUFD = ZW_LAUFD
LAUFI = ZW_LAUFI
TABLES
LAUFK = TAB_LAUFK.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ZW_LAUFI.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'I'
F2NME = 'ZW_LAUFD'
IMPORTING
LAUFD = ZW_LAUFD
LAUFI = ZW_LAUFI
TABLES
LAUFK = TAB_LAUFK.
Prüfung der Eingaben (AT SELECTION-SCREEN) *
INCLUDE RFCHKI00.
IF PAR_XTIM IS INITIAL.
SHIFT PAR_XTIM BY 6 PLACES.
ENDIF.
Seitentitel (Bankinformation und Überschrift) *
TOP-OF-PAGE.
FORMAT RESET.
MOVE MIKLINE TO BHDGD-GRPIN.
PERFORM BATCH-HEADING(RSBTCHH0).
ULINE.
SKIP.
TXT_ZEILE = TEXT-007.
REPLACE:
'&HBKID' WITH PAYR-HBKID INTO TXT_ZEILE,
'&BANKA' WITH BNKA-BANKA INTO TXT_ZEILE,
'&ORT01' WITH BNKA-ORT01 INTO TXT_ZEILE.
WRITE:
/ TXT_ZEILE(16) COLOR 1 INVERSE,
TXT_ZEILE+16(115).
TXT_ZEILE = TEXT-008.
REPLACE:
'&BANKL' WITH T012-BANKL INTO TXT_ZEILE.
WRITE:
/ TXT_ZEILE(16) COLOR 1 INVERSE,
TXT_ZEILE+16(115).
TXT_ZEILE = TEXT-009.
REPLACE:
'&HKTID' WITH PAYR-HKTID INTO TXT_ZEILE,
'&BANKN' WITH T012K-BANKN INTO TXT_ZEILE.
WRITE:
/ TXT_ZEILE(16) COLOR 1 INVERSE,
TXT_ZEILE+16(115).
SKIP.
ULINE.
FORMAT COLOR 1 INTENSIFIED OFF.
WRITE: / SY-VLINE NO-GAP,
T042Z-TEXT1,
132 SY-VLINE. "syalla asr 11456
171 SY-VLINE. "syalla asr 11456
FORMAT RESET.
ULINE.
TXT_ZEILE = TEXT-005.
IF PAR_XPER NE SPACE.
TXT_ZEILE+15(10) = TEXT-017.
ENDIF.
IF PAR_XAUS NE SPACE.
IF TXT_ZEILE CA '/'.
WRITE:
SPACE TO TXT_ZEILE+SY-FDPOS,
SY-VLINE TO TXT_ZEILE+169.
ENDIF.
ENDIF.
IF PAR_EPOS EQ SPACE.
WRITE:
/ TXT_ZEILE COLOR 1 INTENSIFIED,
132 'Disc earned' COLOR 1 INTENSIFIED, "syalla asr 11456
149 'Disc taken'COLOR 1 INTENSIFIED, "syalla asr 11456
161 'Disc lost'COLOR 1 INTENSIFIED, "syalla asr 11456
171 SY-VLINE . "syalla asr 11456
ELSE.
WRITE:
/ TXT_ZEILE COLOR 7 INTENSIFIED,
/ TEXT-006 COLOR 1 INTENSIFIED,
171 SY-VLINE . "syalla asr 11456
SUMMARY.
ENDIF.
ULINE.
Seitenende *
END-OF-PAGE.
ULINE.
Schecks selektieren *
START-OF-SELECTION.
Keine Verarbeitung von Vorschlagsläufen
IF ZW_XVORL NE SPACE.
MESSAGE S615 WITH SY-REPID.
STOP.
ENDIF.
Keine FI-Selektion bei HR und umgekehrt
CLEAR SEL_LAUI.
SEL_LAUI-LOW = '+++++P'.
SEL_LAUI-OPTION = 'CP'.
IF PAR_XPER EQ SPACE.
SEL_LAUI-SIGN = 'E'.
REFRESH SEL_PERN.
ELSE.
SEL_LAUI-SIGN = 'I'.
REFRESH SEL_VBLN.
CLEAR SEL_VBLN.
SEL_VBLN-OPTION = 'EQ'.
SEL_VBLN-SIGN = 'I'.
APPEND SEL_VBLN.
CLEAR PAR_EPOS.
ENDIF.
IF ZW_LAUFI IS INITIAL.
APPEND SEL_LAUI.
ENDIF.
Übergabe der Zahllauf- und Extraktparameter als Select-Option
IF NOT ( ZW_LAUFD IS INITIAL ).
CLEAR SEL_LAUD.
SEL_LAUD-LOW = ZW_LAUFD.
SEL_LAUD-OPTION = 'EQ'.
SEL_LAUD-SIGN = 'I'.
APPEND SEL_LAUD.
ENDIF.
IF NOT ( ZW_LAUFI IS INITIAL ).
CLEAR SEL_LAUI.
SEL_LAUI-LOW = ZW_LAUFI.
SEL_LAUI-OPTION = 'EQ'.
SEL_LAUI-SIGN = 'I'.
APPEND SEL_LAUI.
ENDIF.
IF NOT ( PAR_XDAT IS INITIAL ).
CLEAR SEL_XDAT.
SEL_XDAT-LOW = PAR_XDAT.
SEL_XDAT-OPTION = 'EQ'.
SEL_XDAT-SIGN = 'I'.
APPEND SEL_XDAT.
ENDIF.
IF PAR_XTIM NE SPACE.
CLEAR SEL_XTIM.
SEL_XTIM-LOW = PAR_XTIM.
SEL_XTIM-OPTION = 'EQ'.
SEL_XTIM-SIGN = 'I'.
APPEND SEL_XTIM.
ENDIF.
Nur gültige Schecks selektieren, wenn Währung gewünscht
IF NOT ( SEL_WAER IS INITIAL ).
CLEAR SEL_ECHT.
SEL_ECHT-OPTION = 'EQ'.
SEL_ECHT-SIGN = 'I'.
APPEND SEL_ECHT.
ENDIF.
Zusatztitel füllen
IF PAR_LINE EQ SPACE.
PAR_LINE = TEXT-014.
REPLACE '&BUKRS' WITH PAR_ZBUK INTO PAR_LINE.
ENDIF.
Abweichender Titel für die Scheckaußenstandsliste
IF PAR_XAUS NE SPACE.
SY-TITLE = TEXT-013.
ENDIF.
Batch-Heading und Mikro-Fiche-Zeile vorbereiten
BHDGD-INIFL = 0.
BHDGD-LINES = SY-LINSZ.
BHDGD-UNAME = SY-UNAME.
BHDGD-REPID = SY-REPID.
BHDGD-LINE1 = SY-TITLE.
BHDGD-LINE2 = PAR_LINE.
BHDGD-MIFFL = PAR_MIKF.
BHDGD-SEPAR = PAR_LSEP.
BHDGD-DOMAI = 'BUKRS'.
BHDGD-BUKRS = PAR_ZBUK.
BHDGD-WERTE = PAR_ZBUK.
MIKLINE-ZBUKR = PAR_ZBUK.
PERFORM NEW-SECTION(RSBTCHH0).
Alle möglichen Zahlwege ermitteln, die Schecks produzieren, und
besondere Behandlung der Schecknummer-Parameter/Betrags-Select-Option
INCLUDE RFCHKI10.
SELECT SINGLE * FROM T005 WHERE LAND1 EQ T001-LAND1.
Selektion der Daten
SELECT * FROM PAYR
WHERE ZBUKR EQ PAR_ZBUK
AND HBKID IN SEL_HBKI
AND HKTID IN SEL_HKTI
AND RZAWE IN TAB_RZAWE
AND CHECF LE PAR_CHKT
AND CHECT GE PAR_CHKF
AND LAUFD IN SEL_LAUD
AND LAUFI IN SEL_LAUI
AND VBLNR IN SEL_VBLN
AND ZALDT IN SEL_ZALD
AND WAERS IN SEL_WAER
AND RWBTR IN SEL_RWBT
AND BANCD IN SEL_BNCD
AND EXTRD IN SEL_XDAT
AND EXTRT IN SEL_XTIM
AND ( PRIDT IN SEL_CPUD
OR VOIDD IN SEL_CPUD )
AND ( PRIUS IN SEL_USER
OR VOIDU IN SEL_USER )
AND VOIDR IN SEL_VOID
AND VOIDR IN SEL_ECHT.
CHECK PAYR-PERNR IN SEL_PERN.
IF PAR_XAUS NE SPACE. "nur nicht eingelöste Schecks
CHECK PAYR-XBANC EQ SPACE AND PAYR-VOIDR EQ SPACE.
ENDIF.
Modification carried out by VChavva on 3/5/01
Check posting date of the document on the selection screen.
IF NOT S_BUDAT IS INITIAL.
SELECT SINGLE BUDAT FROM BKPF INTO BKPF-BUDAT
WHERE BUKRS EQ PAYR-ZBUKR AND
BELNR EQ PAYR-VBLNR AND
GJAHR EQ PAYR-GJAHR AND
BUDAT IN S_BUDAT.
CHECK SY-SUBRC EQ 0.
ENDIF.
End modification
CLEAR POSTAB.
IF PAYR-XMANU NE SPACE.
PAYR-RZAWE = SPACE.
ENDIF.
EXTRACT ZAHLUNG.
IF PAR_EPOS NE SPACE AND PAYR-VOIDR EQ SPACE.
REFRESH: POSTAB.
CALL FUNCTION 'GET_INVOICE_DOCUMENT_NUMBERS'
EXPORTING
I_XBUKR = PAYR-XBUKR
I_ZBUKR = PAYR-ZBUKR
I_VBLNR = PAYR-VBLNR
I_GJAHR = PAYR-GJAHR
TABLES
T_INVOICE = POSTAB.
LOOP AT POSTAB.
IF POSTAB-XHELL EQ SPACE.
EXTRACT RECHNUNG.
ENDIF.
ENDLOOP.
ENDIF.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE S509.
ENDIF.
SORT.
LOOP.
PERFORM GET_DATA_FOR_DISCOUNT_EARNED. "syalla asr 11456
PERFORM GET_DATA_FOR_DISCOUNT_TAKEN. "syalla asr 11456
PERFORM GET_DATA_FOR_DISCOUNT_LOST. "syalla 11456
AT NEW PAYR-HKTID.
PERFORM WRITE_BANK.
ENDAT.
AT NEW PAYR-RZAWE.
PERFORM WRITE_ZAHLWEG.
ENDAT.
AT ZAHLUNG.
PERFORM WRITE_ZAHLUNG.
ENDAT.
AT RECHNUNG.
PERFORM WRITE_RECHNUNG.
ENDAT.
AT END OF PAYR-CHECT.
PERFORM WRITE_RECHNUNGSSUMME.
ENDAT.
AT END OF PAYR-RZAWE.
PERFORM WRITE_ZAHLWEGSUMME.
ENDAT.
ENDLOOP.
IF SY-BATCH NE SPACE.
MESSAGE S620.
ENDIF.
FORM WRITE_BANK *
Bereitstellen der Zeilen mit den Bankinformationen für den Titel *
FORM WRITE_BANK.
MIKLINE-HBKID = PAYR-HBKID.
MIKLINE-HKTID = PAYR-HKTID.
SELECT SINGLE * FROM T012
WHERE BUKRS EQ PAYR-ZBUKR
AND HBKID EQ PAYR-HBKID.
SELECT SINGLE * FROM T012K
WHERE BUKRS EQ PAYR-ZBUKR
AND HBKID EQ PAYR-HBKID
AND HKTID EQ PAYR-HKTID.
IF T005-BNKEY EQ '2'.
T012-BANKL = T012K-BANKN.
ENDIF.
SELECT SINGLE * FROM BNKA
WHERE BANKS EQ T012-BANKS
AND BANKL EQ T012-BANKL.
ENDFORM.
FORM WRITE_ZAHLWEG *
Bereitstellen einer Zeile mit dem Namen des Zahlwegs für den Titel *
FORM WRITE_ZAHLWEG.
MIKLINE-RZAWE = PAYR-RZAWE.
MIKLINE-CHECF = PAYR-CHECF.
IF PAYR-RZAWE NE SPACE.
SELECT SINGLE * FROM T042Z
WHERE LAND1 EQ T001-LAND1
AND ZLSCH EQ PAYR-RZAWE.
ELSEIF PAYR-XMANU EQ SPACE.
T042Z-TEXT1 = TEXT-010.
ELSE.
T042Z-TEXT1 = TEXT-011.
ENDIF.
NEW-PAGE.
FLG_INTENSIV = 1.
REFRESH TAB_SUMME.
ENDFORM.
FORM WRITE_ZAHLUNG *
Ausgabe einer Zeile mit Scheckinformationen *
FORM WRITE_ZAHLUNG.
IF PAR_EPOS NE SPACE. "Item Paid
FORMAT COLOR 7 INTENSIFIED OFF.
ELSE.
IF FLG_INTENSIV = 0.
FLG_INTENSIV = 1.
FORMAT COLOR 2 INTENSIFIED OFF.
ELSE.
FLG_INTENSIV = 0.
FORMAT COLOR 2 INTENSIFIED.
ENDIF.
ENDIF.
WRITE / SY-VLINE NO-GAP.
IF PAR_XPER NE SPACE AND PAYR-PERNR NE 0.
PAYR-VBLNR = PAYR-PERNR.
ENDIF.
IF PAYR-VOIDR EQ SPACE.
WRITE: PAYR-CHECT,
PAYR-VBLNR,
PAYR-ZALDT DD/MM/YYYY,
PAYR-WAERS,
(14) PAYR-RWBTR CURRENCY PAYR-WAERS NO-SIGN,
60(30) PAYR-ZNME1.
CLEAR TXT_ZEILE.
TXT_ZEILE = PAYR-ZORT1.
TXT_ZEILE+36 = PAYR-ZREGI.
CONDENSE TXT_ZEILE.
IF PAR_XAUS NE SPACE OR PAYR-XBANC EQ SPACE.
WRITE:
(38) TXT_ZEILE.
ELSE.
WRITE:
(30) TXT_ZEILE.
ENDIF.
IF PAYR-XBANC NE SPACE.
WRITE:
117 PAYR-BANCD DD/MM/YYYY. "SYALLA ASR 11456
122 payr-bancd dd/mm/yyyy. "SYALLA ASR 11456
ENDIF.
IF PAR_EPOS EQ SPACE. "Items paid
ASR 4176 BY RAJU
DISER = DISTA + DISLO.
ASR 4176 BY RAJU
WRITE: 128 DISER DECIMALS 2. "SYALLA asr 11456
WRITE: 144 DISTA DECIMALS 2. "SYALLA asr 11456
WRITE: 160 DISLO DECIMALS 2. "SYALLA asr 11456
CLEAR: diser,dista,dislo,distot. "JASSI
ENDIF.
ELSE.
IF PAYR-CHECF EQ PAYR-CHECT.
WRITE PAYR-CHECT.
IF PAYR-VBLNR NE SPACE.
WRITE: PAYR-VBLNR,
PAYR-ZALDT DD/MM/YYYY.
ENDIF.
ELSE.
WRITE:
PAYR-CHECF TO HLP_VON/BIS,
'-' TO HLP_VON/BIS+13,
PAYR-CHECT TO HLP_VON/BIS+14.
CONDENSE HLP_VON/BIS NO-GAPS.
WRITE HLP_VON/BIS.
ENDIF.
TXT_ZEILE = TEXT-004. "entwertet durch ... am ...
SELECT SINGLE * FROM TVOIT
WHERE LANGU EQ SY-LANGU
AND VOIDR EQ PAYR-VOIDR.
WRITE PAYR-VOIDD TO HLP_DATUM DD/MM/YYYY.
REPLACE:
'&VOIDU' WITH PAYR-VOIDU INTO TXT_ZEILE,
'&VOIDD' WITH HLP_DATUM INTO TXT_ZEILE,
'&VOIDT' WITH TVOIT-VOIDT INTO TXT_ZEILE.
CONDENSE TXT_ZEILE.
WRITE:
60 TXT_ZEILE.
ENDIF.
WRITE 132 SY-VLINE. " syalla asr 11456
WRITE 171 SY-VLINE. " syalla asr 11456
IF PAYR-VOIDR EQ SPACE.
TAB_SUMME-WAERS = PAYR-WAERS.
TAB_SUMME-RWBTR = ABS( PAYR-RWBTR ).
Inserted By Jassi on 04/14/04 - ASR# 23240
TAB_SUMME-DISER = DISER. "Discount Earned Total
TAB_SUMME-DISTA = DISTA. "Discount Taken Total
TAB_SUMME-DISLO = DISLO. "Discount Lost Total
End of Insertion on 04/14/04 - ASR# 23240
COLLECT TAB_SUMME.
CLEAR: DISER,DISTA,DISLO,DISTOT. "JASSI
ENDIF.
SUM_WRSHB = 0.
SUM_ABZUG = 0.
SUM_NETTO = 0.
FLG_POSTEN = 0.
FLG_SUMME = 1.
HLP_WAERS = SPACE.
ENDFORM.
FORM WRITE_RECHNUNG *
Ausgabe einer Zeile mit Rechnungsinformationen *
FORM WRITE_RECHNUNG.
DATA:
ABZUG LIKE POSTAB-WSKTO,
NETTO LIKE POSTAB-WRSHB.
FORMAT COLOR 2 INTENSIFIED OFF.
IF FLG_POSTEN EQ 0.
WRITE:
/ SY-VLINE,
SPACE,
TEXT-003, "Gezahlte Posten:
WRITE 132 SY-VLINE. " syalla asr 11456
171 SY-VLINE. " syalla asr 11456
ENDIF.
POSTAB-WRSHB = - POSTAB-WRSHB.
ABZUG = POSTAB-WSKTO + POSTAB-QBSHB.
NETTO = POSTAB-WRSHB + ABZUG.
WRITE:
/ SY-VLINE,
SPACE,
POSTAB-BUKRS,
POSTAB-GSBER,
POSTAB-XBLNR,
POSTAB-BELNR,
POSTAB-BUZEI,
POSTAB-BLDAT DD/MM/YYYY,
POSTAB-BUDAT DD/MM/YYYY,
POSTAB-WAERS,
(17) POSTAB-WRSHB CURRENCY POSTAB-WAERS,
(17) ABZUG CURRENCY POSTAB-WAERS,
(17) NETTO CURRENCY POSTAB-WAERS,
132 SY-VLINE. " syalla asr 11456
171 SY-VLINE. " syalla asr 11456
SUM_WRSHB = SUM_WRSHB + POSTAB-WRSHB.
SUM_ABZUG = SUM_ABZUG + ABZUG.
SUM_NETTO = SUM_NETTO + NETTO.
FLG_POSTEN = 1.
IF HLP_WAERS EQ SPACE.
HLP_WAERS = POSTAB-WAERS.
ELSEIF HLP_WAERS NE POSTAB-WAERS.
FLG_SUMME = 0.
ENDIF.
ENDFORM.
FORM WRITE_RECHNUNGSUMME *
Ausgabe der Summen der Rechnungsinformationen *
FORM WRITE_RECHNUNGSSUMME.
CHECK PAR_EPOS NE SPACE.
IF FLG_POSTEN EQ 1 AND FLG_SUMME EQ 1.
FORMAT COLOR 3 INTENSIFIED OFF.
WRITE:
/ SY-VLINE,
58 TEXT-012,
69 HLP_WAERS,
(17) SUM_WRSHB CURRENCY PAYR-WAERS,
(17) SUM_ABZUG CURRENCY PAYR-WAERS,
(17) SUM_NETTO CURRENCY PAYR-WAERS,
132 SY-VLINE. "syalla asr 11456
171 SY-VLINE. "syalla asr 11456
ENDIF.
ULINE.
ENDFORM.
FORM WRITE_ZAHLWEGSUMME *
Ausgabe der Summen je Währung für diesen Zahlweg *
FORM WRITE_ZAHLWEGSUMME.
FORMAT COLOR 3 INTENSIFIED.
DESCRIBE TABLE TAB_SUMME LINES SY-TFILL.
ADD 2 TO SY-TFILL.
RESERVE SY-TFILL LINES.
SORT TAB_SUMME.
LOOP AT TAB_SUMME.
AT FIRST.
IF PAR_EPOS EQ SPACE.
ULINE.
ENDIF.
WRITE:
/2 TEXT-012,
13 SPACE.
ENDAT.
WRITE:
1(1) SY-VLINE,
38 TAB_SUMME-WAERS,
(14) TAB_SUMME-RWBTR CURRENCY TAB_SUMME-WAERS NO-SIGN.
132 SY-VLINE. "syalla asr 11456
Inserted By Jassi on 04/14/04 - ASR# 23240
Write Totals
WRITE:127 TAB_SUMME-DISER DECIMALS 2. "JASSI
WRITE:144 TAB_SUMME-DISTA DECIMALS 2. "JASSI
WRITE:161 TAB_SUMME-DISLO DECIMALS 2, "JASSI
End of Insertion on 04/14/04 - ASR# 23240
171 SY-VLINE. "syalla asr 11456
NEW-LINE.
ENDLOOP.
IF SY-SUBRC EQ 0 OR PAR_EPOS EQ SPACE.
ULINE.
ENDIF.
ENDFORM.
*& Form GET_DATA_FOR_DISCOUNT_EARNED
text
--> p1 text
<-- p2 text
FORM GET_DATA_FOR_DISCOUNT_EARNED.
SELECT * FROM BSAK WHERE AUGBL = PAYR-VBLNR AND BUKRS = PAYR-ZBUKR.
IF BSAK-BELNR <> BSAK-AUGBL.
IF BSAK-ZBD1P <> '0.000' OR BSAK-ZBD2P <> '0.000'.
IF BSAK-ZBD1T <> 0 AND BSAK-ZBD2T = 0.
DAYS_1 = BSAK-ZBD1T.
PERC_1 = BSAK-ZBD1P.
ENDIF.
IF BSAK-ZBD2T <> 0 AND BSAK-ZBD1T = 0.
DAYS_1 = BSAK-ZBD2T.
PERC_1 = BSAK-ZBD2P.
ENDIF.
IF BSAK-ZBD1T <> 0 AND BSAK-ZBD1T < BSAK-ZBD2T .
DAYS_1 = BSAK-ZBD1T.
PERC_1 = BSAK-ZBD1P.
DAYS_2 = BSAK-ZBD2T.
PERC_2 = BSAK-ZBD2P.
ENDIF.
IF BSAK-ZBD2T <> 0 AND BSAK-ZBD2T < BSAK-ZBD1T .
DAYS_1 = BSAK-ZBD2T.
PERC_1 = BSAK-ZBD2P.
DAYS_2 = BSAK-ZBD1T.
PERC_2 = BSAK-ZBD1P.
ENDIF.
DAYS_PAID = BSAK-AUGDT - BSAK-ZFBDT.
IF DAYS_PAID <= DAYS_1.
DISAM = ( BSAK-DMBTR * PERC_1 ) / 100 .
ELSEIF DAYS_PAID <= DAYS_2.
DISAM = ( BSAK-DMBTR * PERC_2 ) / 100 .
ENDIF.
DISER = DISER + DISAM.
CLEAR DISAM.
ENDIF.
ENDIF.
CLEAR: DISAM,PERC_2,PERC_1,DAYS_1,DAYS_2,DAYS_PAID,BSAK.
ENDSELECT.
ENDFORM. " GET_DATA_FOR_DISCOUNT_EARNED
*& Form GET_DATA_FOR_DISCOUNT_TAKEN
text
--> p1 text
<-- p2 text
FORM GET_DATA_FOR_DISCOUNT_TAKEN.
CLEAR DISTA.
SELECT * FROM BSEG WHERE BUKRS = PAYR-ZBUKR AND BELNR = PAYR-VBLNR.
IF BSEG-HKONT = '0000820000'.
IF BSEG-SHKZG = 'S'.
BSEG-DMBTR = -1 * BSEG-DMBTR.
ENDIF.
DISTA = DISTA + BSEG-DMBTR.
Start Of ASR # 8269 RKSHARMA----
ELSE.
SELECT SINGLE BVORG FROM BKPF INTO BVORG1
WHERE BUKRS = PAYR-ZBUKR AND BELNR = PAYR-VBLNR.
IF BVORG1 <> SPACE.
SELECT BUKRS BELNR FROM BKPF INTO (BUKRS1, BELNR1)
WHERE BVORG = BVORG1.
IF BELNR1 <> PAYR-VBLNR AND BUKRS1 <> PAYR-ZBUKR.
BUKRS2 = BUKRS1.
BELNR2 = BELNR1.
ENDIF.
ENDSELECT.
IF BUKRS2 <> SPACE AND BELNR2 <> SPACE.
SELECT BELNR FROM BSEG INTO BELNR1
WHERE AUGBL = BELNR2
AND BUKRS = BUKRS2.
IF BELNR1 <> BELNR2.
BELNR3 = BELNR1.
ENDIF.
ENDSELECT.
ENDIF.
CLEAR DISTA.
CLEAR DMBTR1.
IF BELNR3 <> SPACE.
SELECT DMBTR HKONT SHKZG FROM BSEG INTO (DMBTR1, HKONT1, SHKZG1)
WHERE BELNR = BELNR3
AND BUKRS = BUKRS2.
IF HKONT1 = '0000820000'.
FLAG = 1.
IF SHKZG1 = 'S'.
DMBTR1 = -1 * DMBTR1.
ENDIF.
IF DMBTR1 <> 0.
DISTA = DISTA + DMBTR1.
ELSE.
DISTA = 0.
ENDIF.
ENDIF.
CLEAR DMBTR1.
ENDSELECT.
ENDIF.
IF FLAG = 0.
*else. "new line
IF BELNR2 <> SPACE.
SELECT DMBTR HKONT SHKZG FROM BSEG INTO (DMBTR1, HKONT1, SHKZG1)
WHERE BELNR = BELNR2
AND BUKRS = BUKRS2.
IF HKONT1 = '0000820000'.
IF SHKZG1 = 'S'.
DMBTR1 = -1 * DMBTR1.
ENDIF.
IF DMBTR1 <> 0.
DISTA = DISTA + DMBTR1.
ELSE.
DISTA = 0.
ENDIF.
ENDIF.
CLEAR DMBTR1.
ENDSELECT.
ENDIF.
ENDIF. "new line----
ENDIF.
End Of ASR # 8269 RKSHARMA----
ENDIF.
CLEAR BSEG.
ENDSELECT.
ENDFORM. " GET_DATA_FOR_DISCOUNT_TAKEN
*& Form GET_DATA_FOR_DISCOUNT_LOST
text
--> p1 text
<-- p2 text
FORM GET_DATA_FOR_DISCOUNT_LOST.
Start Commented by JASSI on 04/14/04 - ASR# 23240
DISTOT = DISER.
DISTOT = DISTOT+0(13).
DISLO = DISTOT - DISTA.
End Commented by JASSI on 04/14/04 - ASR# 23240
Inserted By Jassi on 04/14/04 - ASR# 23240
Fetch the Data for Discount Lost from
Table 'REGUH' - Payment data from payment program
SELECT SINGLE * FROM REGUH WHERE LAUFD = PAYR-LAUFD AND
LAUFI = PAYR-LAUFI AND
ZBUKR = PAYR-ZBUKR AND
LIFNR = PAYR-LIFNR AND
KUNNR = PAYR-KUNNR AND
EMPFG = PAYR-EMPFG AND
VBLNR = PAYR-VBLNR .
IF SY-SUBRC = 0.
DISLO = REGUH-SKVHW.
ENDIF.
End of Insertion on 04/14/04 - ASR# 23240
ENDFORM. " GET_DATA_FOR_DISCOUNT_LOSTHi,
I had exactly the same error on printout.
My case was that if the print out is more than 10 pages, the page number was printed as */21' instead of '10/21'.
And the total quantity was not displayed correctly when return.
I asked my ABAPer to check again how wide the space is for being reserved for the total quantity and page number.
As ABAPer increased the space, it solved this problem.
Regards, -
How to generate this output?URGENT
how to generate using DOM or SAX to get this output?
<project>
<process name = " Process1 " >
</project>
i am stuck here ... may i know how to continued coding from here.. must add in wat ? can any one tell me thank....
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.w3c.dom.DOMException;
import java.io.*;
import java.util.*;
public class TestVector
private Vector m_vProcess;
String strProjectName;
public static void main(String[] args)
TestVector pThis = new TestVector();
pThis -> WriteToXML(m_vProcess);
public void TestVector {
strProjectName ="Project1";
m_vProcess = new Vector();
m_vProcess.add("Process1");
m_vProcess.add("Process2");
public void WriteToXML(Vector vProcess)
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = facory.newDocumentBuilder();
Document builder = builder.parse("Project.xml");
Node rootNode = document.getDocumentElement();
NodeList list = document.getElementsByTagName("Project");
// Loop through the list.
for (int i=0; i < list.getLength(); i++) {
thisProjectNode = list.item(i);
Node thisName1Node = thisProjectNode.getFirstChild();
if (thisName1Node == null) continue;
if (thisName1Node.getFirstChild() == null) continue;
if (! thisName1Node.getFirstChild() instanceof
org.w3c.dom.Text) continue;
String data = thisName1Node.getFirstChild().getNodeValue();
if (! data.equals("Process1")) continue;
//We're at the Mocha Java node. Create and insert the new
//element.
Node newCoffeeNode = document.createElement("Project");
Node newName1Node = document.createElement("Process");
Text tnNode = document.createTextNode("Process1");
newName1Node.appendChild(tnNode);
Node newName2Node = document.createElement("Process");
Text tpNode = document.createTextNode("Process2");
newName2Node.appendChild(tpNode);
newProjectNode.appendChild(newName1Node);
newProjectNode.appendChild(newName2Node);
rootNode.insertBefore(newProjectNode, thisProjectNode);
break;i am not good in programming..wat ever i read b4 ,i wlll forget easily ..and y the output nv come out after i type these...
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.w3c.dom.DOMException;
import java.io.*;
import java.util.*;
public class TestVector
private Vector m_vProcess;
String strProjectName;
public static void main(String[] args)
TestVector pThis = new TestVector();
pThis -> WriteToXML(m_vProcess);
public void TestVector {
strProjectName ="Project1";
m_vProcess = new Vector();
m_vProcess.add("Process1");
m_vProcess.add("Process2");
public void WriteToXML(Vector vProcess)
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = facory.newDocumentBuilder();
Document builder = builder.parse("Project.xml");
TransformerFactory tfac = TransformerFactory.newInstance();
FileWriter fileWtr = new FileWriter("output.xml");
StreamResult strResult = new StreamResult(fileWtr);
Transformer trans = tfac.newTransformer();
trans.transform(new DOMSource(document.getDocumentElement()),strResult);
Node rootNode = document.getDocumentElement();
NodeList list = document.getElementsByTagName("Project");
// Loop through the list.
for (int i=0; i < list.getLength(); i++) {
thisProjectNode = list.item(i);
Node thisName1Node = thisProjectNode.getFirstChild();
if (thisName1Node == null) continue;
if (thisName1Node.getFirstChild() == null) continue;
if (! thisName1Node.getFirstChild() instanceof
org.w3c.dom.Text) continue;
String data = thisName1Node.getFirstChild().getNodeValue();
if (! data.equals("Process1")) continue;
Node newCoffeeNode = document.createElement("Project");
Node newName1Node = document.createElement("Process");
Text tnNode = document.createTextNode("Process1");
newName1Node.appendChild(tnNode);
Node newName2Node = document.createElement("Process");
Text tpNode = document.createTextNode("Process2");
newName2Node.appendChild(tpNode);
newProjectNode.appendChild(newName1Node);
newProjectNode.appendChild(newName2Node);
rootNode.insertBefore(newProjectNode, thisProjectNode);
break; -
Output problem urgent!!
Okay so heres the problem i have a piece of code to convert a decimal value that a user enters into a binary value. My algorithm works its just when the binary value is displayed only the last element of the binary value to be outputed is displayed. But i want all the values of the binary number to be displayed. I dont know what to do plz help.
the code i am using is:
import java.awt.*;
import java.awt.event.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.*;
public class conversion extends JPanel implements ActionListener
JPanel board; // Panel for buttons
JLabel canvas; // Text Area for displaying answer
JButton convert, reset; // buttons
JTextField input; //input text box
public conversion()
super(true); // Call constructor of parent
// Standard layout (flow)
setLayout(new FlowLayout());
// Set up two panels, control board and canvas
board = new JPanel(true);
canvas = new JLabel();
board.setPreferredSize(new Dimension(100, 100));
canvas.setPreferredSize(new Dimension(300, 300));
board.setBorder(BorderFactory.createLineBorder(Color.black));
canvas.setBorder(BorderFactory.createLineBorder(Color.blue));
// Create buttons and attach listeners
convert = new JButton("Convert");
convert.addActionListener(this);
reset = new JButton("Reset");
reset.addActionListener(this);
input = new JTextField(8);
add(canvas); add(board);
// Add button to board panel
board.add(convert);
board.add(input);
board.add(reset);
public void actionPerformed(ActionEvent e)
String inputInfo;
inputInfo = input.getText();
if (e.getSource() == convert){ //action on convert button
//algorithm for decimal to binary conversion
int a = Integer.parseInt(inputInfo); //Gets decimal number inputed
if (a > 255){
canvas.setText("Please enter a number below 256");
else {
int b[] = new int[50];
int i = 0;
if (a / 2!=0 || a==1) //Checks to see if decimal number is divisible by 2
{ //Or exactly equal to 1
while(a!= 1) //While loop for when the decimal inputted is not equal to 1
b= a % 2;
a = a / 2; //Check to see if the remainder is divisible by 2
i++;
b[i]= 1;
for(int x=i;x>=0;x--)
//Displays the binary answer
int answer = b[x];
String stringAns = Integer.toString(b[x]);
System.out.println(stringAns);
canvas.setText ("The binary for your decimal is: " + stringAns); // this is the problem here, only the last element is displayed
if (e.getSource() == reset){ //action on reset button
canvas.setText("");
input.setText("");
//Graphics g = canvas.getGraphics();}
public static void main(String[] args)
// Create a Blob entity
conversion b = new conversion();
// Set up outer frame, and its exit behaviour
JFrame frame = new JFrame("Decimal to binary");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Set the main content frame to be the Blob,
// size the frame (pack) and make it visible
frame.setContentPane(b);
frame.pack();
frame.setVisible(true);pauze wrote:
for(int x=i;x>=0;x--)
//Displays the binary answer
int answer = b[x];
String stringAns = Integer.toString(b[x]);
System.out.println(stringAns);
canvas.setText ("The binary for your decimal is: " + stringAns); // this is the problem here, only the last element is displayed
Each element in the array b contains one digit of the binary representation. You need to convert each digit into a character and then concatenate all the characters into a String before displaying anything. -
In my JSP page i am using Callable Statements for storing the data. The stored procedure returns a value after inserting the data. I want to know, how to access the output parameter passed by the stored procudure in the JSP page
See http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC2013_4 and carefully go through the code fragments therein.
-
Problem in creating New output types - Urgent
hi all,
Issue is that we had created a new plant(NSC) and for that plant, we had created new scripts for Indent and Sales Order. Means I have to create new output types for NSC Orders and Indents.
What i did that I went to SPRO- IMG- Basic Functions- Output Control- Output Determination- Output Det using Cond Tech- Output Det for Sales Documents , created new output types ANSC and BNSC for AN00 and BA00 respectively.
Then Output Types assigned to Partner Functions. Then I went to 'Maintain output determination procedure' and copied V06000 (Quotation Output) and V10000 (Order Output) to ZV0000(NSC Quotation Output) and ZV0001(NSC Order Output) respectively.
Then I went to ZV0000(NSC Quotation Output) and ZV0001(NSC Order Output) determination procedures and changed outputtypes to ANSC and BNSC instead of AN00 and BN00.
Now what should i do next?? I went to 'Assign Output determination procedures' but here no new entries can be added and I cant find procedures which I created.
Any ideas please??
Regards,
Aisha Ishrat
ICI Pakistan Ltd.HI,
follow this steps:
1. In assignment u have to assign ur new output to respective documents
eg: Assign ZV0000(NSC Quotation Output) to QT sale doc type
2. After doing this u have to maintain condition record
goto tcode: VV11-> here enter ur condition type which u have defined-> inside fill in the details--> now click the <b>communication</b> ikon in top--> fill in the details
this is solve ur purpose
regards,
Arun prasad -
hi All
is there a way to set a indicartor in the SAP side to tell the ASN IDOC has been resend and not orginal?
The customer wants that if the ASN idoc is sent again the customer would want to know that its not an origianl ASN instead its a copy of the ASN sent earlier.
any idea how to achieve this?
~SureshHi,
This is normally achieved by selecting from NAST to see if an entry for the same key has a processed status (nast-vstat = '1'). You can then set a field in the IDOC according to the existence of this record or not.
An example selection from nast being:
select single * into *nast
from nast where kappl = nast-kappl
and objky = nast-objky
and kschl = nast-kschl
and spras = nast-spras
and parnr = nast-parnr
and parvw = nast-parvw
and nacha between '1' and '4'
and vstat = '1'.
if sy-subrc eq 0.
This is a repeat output
else.
This is not a repeat output
endif.
Hope this helps,
Darren -
How/where can you change the delimiters within the output file -Urgent Pls!
Hello Experts,
When Exporting data through EAS, how/where can you change the delimiters within the output file (ie. space delimited vs tab delimited vs custom)
Thanks in advance.
Regards,
SonuThis is where I will be shot down in flames but at least in 7.x I am unaware of any configuration option that allows you to export in anything other than space delimited.
I guess you could write a shell/perl script that could change this outside of Essbase
Edited by: DrFosterMan on Jan 16, 2009 12:54 PM -
Prob in gettting output..urgent
can anyone help on this:-
my internal table is :- DATA : BEGIN OF TBL_FINAL OCCURS 0,
BTRTL LIKE PA0001-BTRTL,
ABWTG LIKE PA2001-ABWTG,
BTEXT TYPE T001P-BTEXT,
NO_OF_OCC(4) TYPE C,
NO_OF_WORKERS TYPE I,
HOURS_WORK TYPE P DECIMALS 2,
WORK_DAYS_LOST TYPE I,
INC_RATE TYPE P DECIMALS 2,
INC_ROLL TYPE P DECIMALS 2,
FREQ_RATE TYPE P DECIMALS 2,
FREQ_ROLL TYPE P DECIMALS 2,
TIME_LOST TYPE P DECIMALS 2,
TIME_ROLL TYPE P DECIMALS 2,
END OF TBL_FINAL.
using this query i am getting personal text and no. of workers:- SELECT BTRTL COUNT(*) INTO (TBL_FINAL-BTRTL,
TBL_FINAL-NO_OF_WORKERS)
FROM PA0000 INNER JOIN PA0001 ON PA0000PERNR = PA0001PERNR
WHERE PA0000ENDDA = '99991231' AND PA0000STAT2 = '3'
AND PA0001~BTRTL IN S_BTRTL
GROUP BY BTRTL.
APPEND TBL_FINAL.
ENDSELECT.
now i want to add no.of work days lost to this internal table:-
eg:- select count(*)from pa2001-abwtg
can any one help me..Put the select statement inside the SELECT..ENDSELECT and move the value to your internal table before you append the record.
Regards,
Rich Heilman -
VT70 output type. urgent
Hi
Hi have out type for picking list Zpak where i want for some material Text should be added. it is only for some material with some plants and otherthings should not change. can anybody explain the logic how to do it.
thanks in advance
Ramachandrahi Ramachandra,
the picking list is done by a Printing-Program, that calls a SAP-Script formular.
You habe th change the SAP-Script - formular and add your coding.
How to get to the formular ?
Goto SE71 and Start the debugger of SAP - Script.
Print your Picking-list with VT70.
The Program will stop at SAP-Script - so you can see the name of the formular.
If you are not a programmer - pls let them do the rest.
Hans -
Conky to show current i3 workspaces. i3-msg script [SOLVED]
Currently I have conky piped to i3 bar. i3 bar shows workspaces on it's own, I like this functionality but it overlaps with the conky output. I set workspace buttons off but of course i have no way of seeing workspaces. So in short I want conky to display all the open workspaces and highlight the current one. the solution i have come up with is to use the command
i3-msg -t get_workspaces
which displays an output like
[{"num":1,"name":"1","visible":false,"focused":false,"rect":{"x":0,"y":19,"width":1366,"height":749},"output":"LVDS1","urgent":false},{"num":2,"name":"2","visible":false,"focused":false,"rect":{"x":0,"y":19,"width":1366,"height":749},"output":"LVDS1","urgent":false},{"num":3,"name":"3","visible":false,"focused":false,"rect":{"x":0,"y":19,"width":1366,"height":749},"output":"LVDS1","urgent":false},{"num":4,"name":"4","visible":false,"focused":false,"rect":{"x":0,"y":19,"width":1366,"height":749},"output":"LVDS1","urgent":false},{"num":5,"name":"5","visible":true,"focused":true,"rect":{"x":0,"y":19,"width":1366,"height":749},"output":"LVDS1","urgent":false}]
so if i could pipe it to grep or form a sort of script to filter out the numbers and which desktop is visible i could easily put it into conky but i am not sure how to go about create such a script. Once i have the script i could easily create my conkyrc to give the desired output but i am not sure where to start with such a script.
Last edited by jaredanderson (2013-08-18 08:15:33)To be honest never liked running two bars, takes up too much space. the jshon thing wasn't a hundred percent what i was looking for but it gave me a good base to build off of. my script looks like this.
#! /bin/bash
if [ $# -lt 1 ]
then
echo "no command"
exit
fi
case $1 in
"color")
color=`i3-msg -t get_workspaces | jshon -a -e name -u -p -e focused -u | paste -d ' ' - - | grep $2 | cut -c3-`
# set true and false to 0 and 1 for conky
#true and false determines highlight for workspace
if [ "$color" = "" ]; then
echo "null"
elif [ "$color" = "false" ]; then
echo "0"
elif [ "$color" = "true" ]; then
echo "1"
fi
"status")
stat=`i3-msg -t get_workspaces | jshon -a -e name -u | grep $2`
#shows if workspace entered exists
#only negative is tenth workspace is plotted to 0
if [ "$stat" = "" ]; then
echo "0"
else
echo $stat
fi
esac
there is probably an even better way to do this but this works for me.
I then added these lines to my conkyrc
"full_text":
${if_match ${exec ~/.scripts/i3wc status 1}>0}
"1",
${else} "",
${endif}
"color":
${if_match ${exec ~/.scripts/i3wc color 1}<1}"\#2aa198"${else}
${if_match ${exec ~/.scripts/i3wc color 1}>0}"\#cb4b16"${else}
"\#ffffff"
${endif}
${endif}
a slight draw back is this makes my conkyrc gargantuan because I have to insert this set individually for all nine workspaces.
but it shows all workspaces and highlights the current one which is exactly what 'i wanted so I can't complain. thanks for the help progandy never would have done it without you.
probably could remove the final else in the conkyrc under color. color wouldn't be use because no text is output
Last edited by jaredanderson (2013-08-18 08:27:24)
Maybe you are looking for
-
I have just purchased a new ipad for my wife. On my ipad we purchased education apps for her to use , I have placed the apps on her ipad but when we open her itunes account to sync apps the computer will remove these apps and only leave her existing
-
hi i'm trying to install updates but Name and then the password I have for the account won't let me in. Is my name my email address?
-
Installing Itunes v. 7 on XP - won't load - no error message
I know nothing about computers. I previously had v. 6 and can play music, but can't preview or download videos. I tried downloading v. 7 & quicktime. It thanks me for downloading, but nothing has downloaded, and I received no error messages. How do I
-
I have downloaded a trial membership for Audition so I can get the hang of recording a podcast prior to purchase. The program is downloaded, where do I find the recording screen?! I am sure I am missing one simple element! Thanks!
-
I would like to preset a default value to be displayed by the input select control. Thanks in advance null