Script modification need
DOCU WINDOW
This is the window on the top right side
1.Document no (hard coded)
2.Then display the document number for the first document for the current row. Maybe you should check prior to printing if the current row was posted error free
and invoke printing only if this is the case. Then get the first(!!!) document number from the error/message log for this row. ZGF_ICO_RECHR_L-DOCFR
3. Document date (hard coded) it is P_BLDAT on the selection screen, already correct in the form
4. VAT No (hard coded)
5. Then display the EU VAT reg.no of that company. This is in table KNA1, where KUNNR = L_ROW-CUSTFR. The field is KNA1-STCEG, if it is empty, try to populate
KNA1-STCD1.
6. Order number(Hard coded)
7. Just concatenate L_ROW-REF + the last number for that reference from the log table ZGF_ICO_RECHR_L (notice this table has not yet been created!!! and also
the part is missing where we populate that table when posting both documents for a particular row) ZGF_ICO_RECHR_L-REF+NUMBER
report ZG00F_.
Top Include for the data declarations
class LCL_REF definition deferred.
include ZG00F_INT_POST_INVOICE_TOP.
data: G_ALV_TREE type ref to CL_GUI_ALV_TREE,
G_CUSTOM_CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER,
G_TEXT_CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER,
G_LOGGER type ref to CL_GUI_TEXTEDIT,
G_TOOLBAR type ref to CL_GUI_TOOLBAR.
data: " gt_zgf_ico_rechr type zgf_ico_rechr occurs 0,
"Output-Table
OKCODE like SY-UCOMM.
CLASS LCL_REF DEFINITION
class LCL_REF definition.
public section.
data : VALID type BOOLEAN,
CAN type BOOLEAN.
methods : CONSTRUCTOR
importing IM_REF type ZGF_ICO_RECHR,
CAN_POST
returning VALUE(CAN) type BOOLEAN,
IS_VALID
returning VALUE(IS_VALID) type BOOLEAN,
GET_DIVA returning VALUE(DIVA) type LVC_S_LAYN,
GET_DIVAC returning VALUE(DIVAC) type LVC_S_LACN,
FILL_BAPI_TABLES,
GET_REF returning VALUE(R_REF) type ZGF_ICO_RECHR-REF,
POST_INVOICE,
PRINT_INVOICE,
GET_ERRORS returning
VALUE(R_ERROR_TAB) type ABAPTXT255_TAB,
GET_PRDATA returning
VALUE(PR_REF) type ZGF_ICO_RECHR.
private section.
data: LINE type ABAPTXT255,
ERROR_TAB type ABAPTXT255_TAB,
FIELD like LINE.
methods : CHECK_VALIDITY.
endclass. "lcl_ref DEFINITION
CLASS lcl_ref IMPLEMENTATION
class LCL_REF implementation.
method GET_ERRORS.
R_ERROR_TAB = ME->ERROR_TAB.
endmethod. "get_errors
method IS_VALID.
IS_VALID = ME->VALID.
endmethod. "is_valid
method GET_PRDATA.
PR_REF = L_REF.
endmethod. "is_valid
method PRINT_INVOICE.
data: L_KUNNR type KNA1-KUNNR.
data: L_ROW type ZGF_ICO_RECHR.
call function 'OPEN_FORM'
exporting
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZGF_INVOICE'
LANGUAGE = SY-LANGU
OPTIONS = is_options
exceptions
CANCELED = 1
DEVICE = 2
others = 12.
if SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'START_FORM'
exporting
ARCHIVE_INDEX =
FORM = 'ZGF_INVOICE'
LANGUAGE = SY-LANGU
exceptions
FORM = 1
others = 8.
if SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
IF L_REF-TOTAL >= 0.
IV_INVOICE = 'INVOICE (COMCoE Recharge)'.
ELSE.
IV_INVOICE = 'Credit Memo (COMCoE Recharge)'.
ENDIF.
call method ME->GET_PRDATA
receiving
PR_REF = L_ROW.
L_KUNNR = L_ROW-CUSTFR.
select single RCOMP ADRNR LAND1 ORT01
into (IV_RCOMP, IV_ADRNR, IV_COMPLAND1, IV_COMPORT01)
from T001 where BUKRS = L_ROW-CCFR.
call function 'WRITE_FORM'
exporting
WINDOW = 'INVOICE'
ELEMENT = 'T3'
exceptions
WINDOW = 1
ELEMENT = 2.
IV_DOCDATE = P_BLDAT.
IV_ORDNU = L_ROW-REF.
call function 'WRITE_FORM'
exporting
WINDOW = 'DOCU'
ELEMENT = 'T2'
exceptions
WINDOW = 1
ELEMENT = 2.
select single KUNNR STRAS NAME1 LAND1 ORT01 STCEG
into
(IV_CUSTNO, IV_CUSTADD, IV_CUSTNAME1, IV_CUSTLAND1, IV_CUSTCITY,
IV_DOCVAT)
from KNA1
where KUNNR = L_KUNNR.
call function 'WRITE_FORM'
exporting
WINDOW = 'CUST'
ELEMENT = 'T6'
exceptions
WINDOW = 1
ELEMENT = 2.
IV_CUSTNO = L_KUNNR.
IV_CURR = L_ROW-CURR.
call function 'WRITE_FORM'
exporting
WINDOW = 'CUSTNO'
ELEMENT = 'T4'
exceptions
WINDOW = 1
ELEMENT = 2.
data: L_VAR(21).
concatenate P_DATEFR0(4) '/' P_DATEFR4(2) '/' P_DATEFR+6(2)
'-' P_DATETO0(4) '/' P_DATETO4(2) '/' P_DATETO+6(2)
into L_VAR.
IV_PERDAT = L_VAR.
call function 'WRITE_FORM'
exporting
WINDOW = 'MAIN'
ELEMENT = 'T1'
exceptions
WINDOW = 1
ELEMENT = 2.
call function 'WRITE_FORM'
exporting
WINDOW = 'FOOTER'
ELEMENT = 'T5'
exceptions
WINDOW = 1
ELEMENT = 2.
*CALL FUNCTION 'END_FORM'
IMPORTING
RESULT =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SPOOL_ERROR = 3
CODEPAGE = 4
OTHERS = 5.
call function 'END_FORM'
exceptions
UNOPENED = 1.
if SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'CLOSE_FORM'
exceptions
others = 6.
if SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmethod. "is_valid
method GET_REF.
R_REF = REF.
endmethod. "get_ref
method CONSTRUCTOR.
L_REF = IM_REF.
REF = IM_REF-REF.
call method ME->CHECK_VALIDITY.
endmethod. "constructor
method GET_DIVA.
DIVA-ISFOLDER = ''.
if VALID <> 'X'.
DIVA-N_IMAGE = ICON_NEGATIVE.
else.
DIVA-N_IMAGE = ICON_POSITIVE.
endif.
endmethod. "get_diva
method GET_DIVAC.
if V_ERROR1 = 'Y' or V_ERROR2 = 'Y'.
DIVAC-N_IMAGE = ICON_RED_LIGHT.
elseif V_ERROR1 = 'N' and V_ERROR2 = 'N'.
DIVAC-N_IMAGE = ICON_GREEN_LIGHT.
endif.
DIVAC-U_N_IMAGE = 'X'.
endmethod. "get_divac
method CAN_POST.
CAN = 'X'.
call method ME->FILL_BAPI_TABLES.
endmethod. "can_post
method CHECK_VALIDITY.
*Reference field must begin with M, Q, Y or J. Otherwise display an
*error msg with text symbol TEXT-001 (ZGF_ICO_RECHR validation error
*Reference incorrect rec.x) where x ist the numebr of the incorrect
*record.
data: L_CHAR(1),
L_REF1 type ZGF_ICO_RECHR-REF,
L_ERR type OUTTAB_LINE_ERROR,
L_NUM type N,
L_KNB1 type KNB1,
L_TBSL type TBSL,
L_CSKS type CSKS,
L_LFB1 type LFB1.
l_flag(1).
clear: L_CHAR, L_NUM, VALID.
VALID = 'X'.
L_REF1 = L_REF-REF.
L_CHAR = L_REF1+0(1).
if not ( L_CHAR = 'M' or L_CHAR = 'Q'
or L_CHAR = 'Y' or L_CHAR = 'J').
MESSAGE E398(00) WITH TEXT-001 ' ' ' ' ' '.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-001.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
clear: L_CHAR, L_NUM.
L_CHAR = L_REF1+1(1).
L_NUM = L_CHAR.
if not L_CHAR = '0'.
if L_NUM = 0.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-001.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
endif.
clear: L_CHAR, L_NUM.
L_CHAR = L_REF1+2(1).
L_NUM = L_CHAR.
if not L_CHAR = '0'.
if L_NUM = 0.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-001.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
endif.
clear: L_CHAR, L_NUM.
L_CHAR = L_REF1+3(1).
L_NUM = L_CHAR.
if not L_CHAR = '0'.
if L_NUM = 0.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-001.
L_ERR-REC_NO = G_CNTR.
append L_ERR-ERR_MESG to GT_ZGF_ICO_RECHR_ERRORS.
VALID = 'F'.
endif.
endif.
if not ( L_REF-FREQ = 'M' or L_REF-FREQ = 'Q' or L_REF-FREQ = 'Y').
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-002.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
if not ( L_REF-CODE = 'A' or L_REF-CODE = 'B' or L_REF-CODE = 'C'
or L_REF-CODE = 'D' or L_REF-CODE = 'E'
or L_REF-CODE = 'F' ).
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-003.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
*Customer FROM must not be flagged for deletion in KNB1. (KNB1-LOEVM
*must be space), otherwise error message with TEXT-007. (ZGF_ICO_RECHR
*validation error From customer marked for deletion rec.x) where x
*ist the number of the incorrect record.
select single * from KNB1 into L_KNB1
where KUNNR = L_REF-CUSTFR.
if SY-SUBRC = 0.
if not L_KNB1-LOEVM is initial.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-007.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
if not L_KNB1-SPERR is initial.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-006.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
endif.
select single * from TBSL into L_TBSL
where BSCHL = L_REF-PKFRD.
if not L_TBSL-KOART = 'D'.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-008.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
select single * from TBSL into L_TBSL
where BSCHL = L_REF-PKFRS.
if not L_TBSL-KOART = 'S'.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-009.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
if not L_REF-PLTFR is initial.
select single * from CSKS into L_CSKS
where ZZWERKS = L_REF-PKFRS.
if SY-SUBRC <> 0.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-012.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
endif.
select single * from LFB1 into L_LFB1
where LIFNR = L_REF-CUSTTO.
if not L_LFB1-LOEVM is initial.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-018.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
if not LFB1-SPERR is initial.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-019.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
select single * from TBSL into L_TBSL
where BSCHL = L_REF-PKTOK.
if not L_TBSL-KOART = 'K'.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-020.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
select single * from TBSL into L_TBSL
where BSCHL = L_REF-PKTOS.
if not L_TBSL-KOART = 'S'.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-021.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
if not L_REF-TOTAL > 0.
clear L_ERR.
L_ERR = L_REF.
L_ERR-ERR_MESG = TEXT-017.
L_ERR-REC_NO = G_CNTR.
append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
append L_ERR-ERR_MESG to ERROR_TAB.
VALID = 'F'.
endif.
return valid.
endmethod. "check_validity
--- Method Post Invoice Start ---
method POST_INVOICE.
endmethod. "post_invoice
--- Method Post Invoice End ---
--- Method Filling Bapi Tables Start ---
method FILL_BAPI_TABLES.
*---- Populating Bapi for Customer
V_TOTAL = L_REF-TOTAL.
perform FILL_BAPI_CUSTOMER.
V_ERROR1 = 'N'.
V_ERROR2 = 'N'.
delete IT_ERROR where NODE_ID = L_SELECTED_NODE.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = SY-ULINE(30).
append IS_ERROR to IT_ERROR.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = L_REF-REF.
append IS_ERROR to IT_ERROR.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = SY-ULINE(30).
append IS_ERROR to IT_ERROR.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = '*** Checking Customer Document ***'.
append IS_ERROR to IT_ERROR.
clear IS_ERROR.
*---- Checking for 1st Document
call function 'BAPI_ACC_DOCUMENT_CHECK'
exporting
DOCUMENTHEADER = WA_DOCUMENTHEADER
tables
ACCOUNTGL = LT_ACCOUNTGL
ACCOUNTRECEIVABLE =
LT_ACCOUNTRECEIVABLE
ACCOUNTTAX = LT_ACCOUNTTAX
CURRENCYAMOUNT = LT_CURRENCYAMOUNT
RETURN = LT_RETURN.
loop at LT_RETURN into WA_RETURN.
if WA_RETURN-TYPE = 'E' or WA_RETURN-TYPE = 'A'.
V_ERROR1 = 'Y'.
endif.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
concatenate WA_RETURN-TYPE WA_RETURN-MESSAGE into IS_ERROR-ERROR
separated by '-'.
append IS_ERROR to IT_ERROR.
endloop.
*--- Checking for 2nd Document
if V_ERROR1 = 'N'.
*---- Populating Bapi for Vendor
L_REF-TOTAL = V_TOTAL.
perform FILL_BAPI_VENDOR.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = '*** Checking for Vendor Document ***'.
append IS_ERROR to IT_ERROR.
clear IS_ERROR.
call function 'BAPI_ACC_DOCUMENT_CHECK'
exporting
DOCUMENTHEADER = WA_DOCUMENTHEADER2
tables
ACCOUNTGL = LT_ACCOUNTGL2
ACCOUNTPAYABLE = LT_ACCOUNTPAYABLE
ACCOUNTTAX = LT_ACCOUNTTAX2
CURRENCYAMOUNT = LT_CURRENCYAMOUNT2
RETURN = LT_RETURN2.
loop at LT_RETURN2 into WA_RETURN2.
if WA_RETURN-TYPE = 'E' or WA_RETURN-TYPE = 'A'.
V_ERROR2 = 'Y'.
endif.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
concatenate WA_RETURN2-TYPE WA_RETURN2-MESSAGE into
IS_ERROR-ERROR separated by '-'.
append IS_ERROR to IT_ERROR.
endloop.
endif.
*--- CHECK WHETHER BOTH DOCUMENTS ARE CORRECT OR NOT returned SUCCESS
if V_ERROR1 = 'N' and V_ERROR2 = 'N'.
*--- Posting 1st Document - Customer
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = '*** Posting Customer Document ***'.
append IS_ERROR to IT_ERROR.
clear IS_ERROR.
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
DOCUMENTHEADER = WA_DOCUMENTHEADER
tables
ACCOUNTGL = LT_ACCOUNTGL
ACCOUNTRECEIVABLE =
LT_ACCOUNTRECEIVABLE
ACCOUNTTAX = LT_ACCOUNTTAX
CURRENCYAMOUNT = LT_CURRENCYAMOUNT
RETURN = LT_RETURN.
call function 'BAPI_TRANSACTION_COMMIT'.
loop at LT_RETURN into WA_RETURN.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
concatenate WA_RETURN-TYPE WA_RETURN-MESSAGE into IS_ERROR-ERROR
separated by '-'.
append IS_ERROR to IT_ERROR.
endloop.
*--- Posting 2nd Document - Vendor
IS_ERROR-NODE_ID = L_SELECTED_NODE.
IS_ERROR-ERROR = '*** Posting Vendor Document ***'.
append IS_ERROR to IT_ERROR.
clear IS_ERROR.
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
DOCUMENTHEADER = WA_DOCUMENTHEADER2
tables
ACCOUNTGL = LT_ACCOUNTGL2
ACCOUNTPAYABLE = LT_ACCOUNTPAYABLE
ACCOUNTTAX = LT_ACCOUNTTAX2
CURRENCYAMOUNT = LT_CURRENCYAMOUNT2
RETURN = LT_RETURN2.
call function 'BAPI_TRANSACTION_COMMIT'.
loop at LT_RETURN2 into WA_RETURN2.
IS_ERROR-NODE_ID = L_SELECTED_NODE.
concatenate WA_RETURN2-TYPE WA_RETURN2-MESSAGE into
IS_ERROR-ERROR separated by '-'.
append IS_ERROR to IT_ERROR.
endloop.
endif. "if V_ERROR1 = 'N' and V_ERROR2 = 'N'.
*--- Setting colour of node.
data: LO_REF type ref to LCL_REF,
IS_NODE_LAYOUT type LVC_S_LACN,
L_NODE_TEXT type LVC_VALUE,
WA_OREF type TY_REF.
clear :IS_NODE_LAYOUT,L_NODE_TEXT, WA_OREF, LO_REF.
create object LO_REF exporting IM_REF = LS_ZGF_ICO_RECHR.
IS_NODE_LAYOUT = LO_REF->GET_DIVAC( ).
read table GT_ZGF_ICO_RECHR into L_REF index L_SELECTED_NODE.
L_NODE_TEXT = L_REF-REF.
call method G_ALV_TREE->CHANGE_NODE
exporting
I_NODE_KEY = L_SELECTED_NODE
I_OUTTAB_LINE = L_REF
IS_NODE_LAYOUT = IS_NODE_LAYOUT
I_NODE_TEXT = L_NODE_TEXT
I_U_NODE_TEXT = 'X'
exceptions
NODE_NOT_FOUND = 1
others = 2.
call method G_ALV_TREE->FRONTEND_UPDATE.
call method CL_GUI_CFW=>FLUSH
exceptions
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2.
endmethod. "fill_int_tables
endclass. "lcl_ref IMPLEMENTATION
CLASS lcl_event_handler DEFINITION
class LCL_EVENT_HANDLER definition.
public section.
class-methods : ON_NODE_CLICK for event
NODE_DOUBLE_CLICK of CL_GUI_ALV_TREE
importing NODE_KEY.
methods: ON_FUNCTION_SELECTED
for event FUNCTION_SELECTED of CL_GUI_TOOLBAR
importing FCODE.
endclass. "lcl_event_handler DEFINITION
CLASS lcl_event_handler IMPLEMENTATION
class LCL_EVENT_HANDLER implementation.
method ON_NODE_CLICK.
endmethod. "on_node_click
method ON_FUNCTION_SELECTED.
data: LT_SELECTED_NODES type LVC_T_NKEY,
L_RC type C,
L_CAN type C,
L_REC type I,
WA_OREF type TY_REF,
L_LINE type SY-TABIX.
Determine which line is selected
call method G_ALV_TREE->GET_SELECTED_NODES
changing
CT_SELECTED_NODES = LT_SELECTED_NODES.
call method CL_GUI_CFW=>FLUSH.
remark: The user can not select more than one node since the
default value of NODE_SELECTION_MODE is
cl_gui_column_Tree=>NODE_SEL_MODE_SINGLE (see constructor).
describe table LT_SELECTED_NODES lines L_REC.
if L_REC = 0 and FCODE = 'ERROR'.
*--- Show log for all if nothing is selected then.
refresh LT_ERRORS.
clear LT_ERRORS.
loop at IT_ERROR into IS_ERROR.
IS_ERRORS-LINE = IS_ERROR-ERROR.
append IS_ERRORS to LT_ERRORS.
endloop.
call method G_LOGGER->SET_TEXT_AS_R3TABLE
exporting
TABLE = LT_ERRORS.
endif.
loop at LT_SELECTED_NODES into L_SELECTED_NODE.
clear : L_REF, WA_OREF.
L_LINE = SY-TABIX.
read table GT_OREF into WA_OREF index L_SELECTED_NODE.
read table GT_ZGF_ICO_RECHR into L_REF index L_SELECTED_NODE.
if SY-SUBRC = 0.
case FCODE.
when 'ERROR'.
refresh LT_ERRORS.
clear LT_ERRORS.
loop at IT_ERROR into IS_ERROR where NODE_ID =
L_SELECTED_NODE.
IS_ERRORS-LINE = IS_ERROR-ERROR.
append IS_ERRORS to LT_ERRORS.
endloop.
call method G_LOGGER->SET_TEXT_AS_R3TABLE
exporting
TABLE = LT_ERRORS.
when 'POST'.
if L_LINE = 1.
if WA_OREF-O_REF->IS_VALID( ) = 'X'.
clear L_RC.
call function 'POPUP_TO_CONFIRM_STEP'
exporting
TEXTLINE1 = 'Do you want to post' "(902)
TEXTLINE2 = '?' "(903)
TITEL = 'Confirmation' "(904)
CANCEL_DISPLAY = ' '
importing
ANSWER = L_RC.
else.
call function 'POPUP_TO_INFORM'
exporting
TITEL = 'Select Another Record..'
TXT1 = 'Data Wrong,'
TXT2 = 'Posting Can Not be Done'.
endif.
else.
L_RC = 'J'.
endif.
if L_RC eq 'J'.
*---Post Invoice.
if WA_OREF-O_REF->CAN_POST( ) = 'X'.
call method WA_OREF-O_REF->POST_INVOICE.
*---Printing Log.
refresh LT_ERRORS.
clear LT_ERRORS.
loop at IT_ERROR into IS_ERROR.
IS_ERRORS-LINE = IS_ERROR-ERROR.
append IS_ERRORS to LT_ERRORS.
endloop.
call method G_LOGGER->SET_TEXT_AS_R3TABLE
exporting
TABLE = LT_ERRORS.
endif.
endif.
when 'PRINT'.
call method WA_OREF-O_REF->PRINT_INVOICE.
endcase.
else.
message I000(0K) with 'Please select a node.'.
endif.
endloop.
endmethod. "on_function_selected
endclass. "lcl_event_handler IMPLEMENTATION
START-OF-SELECTION.
start-of-selection.
end-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module STATUS_0100 output.
set pf-status 'MAIN100'.
set titlebar 'MAINTITLE'.
if G_ALV_TREE is initial.
perform INIT_TREE.
call method CL_GUI_CFW=>FLUSH
exceptions
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2.
if SY-SUBRC ne 0.
call function 'POPUP_TO_INFORM'
exporting
titel = 'Automation Queue failure'(801)
txt1 = 'Internal error:'(802)
txt2 = 'A method in the automation queue'(803)
txt3 = 'caused a failure.'(804).
endif.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Form init_tree
text
--> p1 text
<-- p2 text
form INIT_TREE .
data: L_TREE_CONTAINER_NAME(30) type C.
*Reference tree
L_TREE_CONTAINER_NAME = 'ZCONTAINER'.
create object G_CUSTOM_CONTAINER
exporting
CONTAINER_NAME = L_TREE_CONTAINER_NAME
exceptions
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
if SY-SUBRC <> 0.
MESSAGE x208(00) WITH 'ERROR'(100).
endif.
create tree control
create object G_ALV_TREE
exporting
PARENT = G_CUSTOM_CONTAINER
NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_MULTIPLE
NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_SINGLE
ITEM_SELECTION = 'X'
NO_HTML_HEADER = ''
NO_TOOLBAR = ''
exceptions
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
ILLEGAL_NODE_SELECTION_MODE = 5
FAILED = 6
ILLEGAL_COLUMN_NAME = 7.
if SY-SUBRC <> 0.
message X208(00) with 'ERROR'. "#EC NOTEXT
endif.
****logger
L_TREE_CONTAINER_NAME = 'ZLOGGER'.
create object G_TEXT_CONTAINER
exporting
CONTAINER_NAME = L_TREE_CONTAINER_NAME
exceptions
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
create object G_LOGGER
exporting PARENT = G_TEXT_CONTAINER
NAME = 'Error Log'.
call method G_LOGGER->SET_READONLY_MODE.
endlogger
data L_HIERARCHY_HEADER type TREEV_HHDR.
data: LT_LIST_COMMENTARY type SLIS_T_LISTHEADER,
L_LOGO type SDYDO_VALUE.
data : WA_FIELDCATALOG type LVC_S_FCAT.
perform BUILD_HIERARCHY_HEADER changing L_HIERARCHY_HEADER.
perform BUILD_COMMENT using LT_LIST_COMMENTARY
L_LOGO.
clear : WA_FIELDCATALOG, GT_FIELDCATALOG.
get fieldcatalog
call function 'LVC_FIELDCATALOG_MERGE'
exporting
I_STRUCTURE_NAME = 'ZGF_ICO_RECHR'
changing
CT_FIELDCAT = GT_FIELDCATALOG.
loop at GT_FIELDCATALOG into WA_FIELDCATALOG.
case WA_FIELDCATALOG-FIELDNAME.
when 'REF'.
WA_FIELDCATALOG-NO_OUT = 'X'.
endcase.
WA_FIELDCATALOG-OUTPUTLEN = 15.
modify GT_FIELDCATALOG from WA_FIELDCATALOG.
endloop.
call method G_ALV_TREE->SET_TABLE_FOR_FIRST_DISPLAY
exporting
IT_LIST_COMMENTARY = LT_LIST_COMMENTARY
I_LOGO = L_LOGO
i_structure_name = 'ZGF_ICO_RECHR'
IS_HIERARCHY_HEADER = L_HIERARCHY_HEADER
changing
IT_FIELDCATALOG = GT_FIELDCATALOG
IT_OUTTAB = GT_ZGF_ICO_RECHR. "table must be empty !
perform CREATE_HIERARCHY.
perform CHANGE_TOOLBAR.
perform REGISTER_EVENTS.
call method G_ALV_TREE->FRONTEND_UPDATE.
endform. " init_tree
*& Form build_hierarchy_header
form BUILD_HIERARCHY_HEADER changing
P_HIERARCHY_HEADER type TREEV_HHDR.
P_HIERARCHY_HEADER-HEADING = 'Reference Number'(300).
P_HIERARCHY_HEADER-TOOLTIP = 'Reference numbers for invoices'(400).
P_HIERARCHY_HEADER-WIDTH = 30.
P_HIERARCHY_HEADER-WIDTH_PIX = ' '.
endform. " build_hierarchy_header
*& Form create_hierarchy
form CREATE_HIERARCHY .
clear : LS_ZGF_ICO_RECHR, L_LAST_KEY.
§4a. Select data
refresh GT_ZGF_ICO_RECHR.
select * from ZGF_ICO_RECHR into table LT_ZGF_ICO_RECHR
where FREQ in SO_FREQ
and REF in SO_REF.
sort LT_ZGF_ICO_RECHR by REF.
Note: The top level nodes do not correspond to a field of the
output table. Instead we use data of the table to invent another
hierarchy level above the levels that can be build by sorting.
§4c. Add data to tree
G_CNTR = 1.
sort by oref->get_diva->image .
loop at LT_ZGF_ICO_RECHR into LS_ZGF_ICO_RECHR.
perform ADD_COMPLETE_LINE using LS_ZGF_ICO_RECHR
changing L_LAST_KEY.
G_CNTR = G_CNTR + 1.
perform add_node using ls_zgf_ico_rechr-ref
changing l_last_key.
endloop.
endform. " create_hierarchy
*& Module USER_COMMAND_0100 INPUT
module USER_COMMAND_0100 input.
SAVE_OK = OKCODE.
clear OKCODE.
case SAVE_OK.
when 'EXIT' or 'BACK' or 'CANC'.
perform EXIT_PROGRAM.
when others.
§6. Call dispatch to process toolbar functions
call method CL_GUI_CFW=>DISPATCH.
endcase.
call method CL_GUI_CFW=>FLUSH.
endmodule. " USER_COMMAND_0100 INPUT
*& Form exit_program
text
form EXIT_PROGRAM .
call method G_CUSTOM_CONTAINER->FREE.
leave to screen 0.
endform. " exit_program
*& Form add_complete_line
form ADD_COMPLETE_LINE using P_LS_ZGF_ICO_RECHR type ZGF_ICO_RECHR
P_RELAT_KEY type LVC_NKEY
changing P_NODE_KEY type LVC_NKEY.
data: L_NODE_TEXT type LVC_VALUE,
LO_REF type ref to LCL_REF,
L_NODE_LAYOUT type LVC_S_LAYN.
add leaf:
ALV Tree firstly inserts this node as a leaf if you do not provide
IS_NODE_LAYOUT with field ISFOLDER set.
Since these nodes will never get children they stay leaves
(as intended).
clear L_NODE_LAYOUT.
create object LO_REF exporting IM_REF = P_LS_ZGF_ICO_RECHR.
data : WA_OREF type TY_REF.
clear WA_OREF.
WA_OREF-O_REF = LO_REF.
append WA_OREF to GT_OREF.
L_NODE_LAYOUT = LO_REF->GET_DIVA( ).
L_NODE_TEXT = P_LS_ZGF_ICO_RECHR-REF.
call method G_ALV_TREE->ADD_NODE
exporting
I_RELAT_NODE_KEY = P_RELAT_KEY
I_RELATIONSHIP = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
IS_OUTTAB_LINE = P_LS_ZGF_ICO_RECHR "_REF
I_NODE_TEXT = L_NODE_TEXT
IS_NODE_LAYOUT = L_NODE_LAYOUT
importing
E_NEW_NODE_KEY = P_NODE_KEY.
endform. " add_complete_line
*& Form add_node
form ADD_NODE using P_REF
changing P_NODE_KEY type LVC_NKEY.
clear L_NODE_LAYOUT.
L_NODE_LAYOUT-ISFOLDER = ''.
L_NODE_LAYOUT-N_IMAGE = ICON_POSITIVE.
L_NODE_TEXT = 'Reference1'. " ps_sflight-carrid.
call method G_ALV_TREE->ADD_NODE
exporting
I_RELAT_NODE_KEY = '' " p_relat_key
I_RELATIONSHIP = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
I_NODE_TEXT = L_NODE_TEXT
IS_OUTTAB_LINE = P_REF
IS_NODE_LAYOUT = L_NODE_LAYOUT
importing
E_NEW_NODE_KEY = P_NODE_KEY.
endform. " add_node
*& Form register_events
form REGISTER_EVENTS .
data: LT_EVENTS type CNTL_SIMPLE_EVENTS,
L_EVENT type CNTL_SIMPLE_EVENT,
L_EVENT_RECEIVER type ref to LCL_EVENT_HANDLER.
call method G_ALV_TREE->GET_REGISTERED_EVENTS
importing
EVENTS = LT_EVENTS.
*NODE_DOUBLE_CLICK
clear L_EVENT.
move CL_GUI_COLUMN_TREE=>EVENTID_NODE_DOUBLE_CLICK to L_EVENT-EVENTID.
append L_E
Ok fine that can be acchived by setting the retention policy and by issuing delete obsolete command.That's perfect.If FRA is configured then even delete obsolete command is also not required.
but i want to keep the last full backup for 15 days and archived logs only for one day.In this case can we set seperate retention policy for full backup and backup of archived logs
for the time being i just want to modify my present existing OS script to acchive my task and i will conside changing RMAN script later on.Can u provide me the modified OS script so that my work gets finishes succesfully.
Thank You...
Similar Messages
-
Syslinux Installer / Update Script - Testers Needed
For those who don't follow the ML that closely....
Hello Community,
Over the last few weeks I have been working on Syslinux support for the installer. With the help Thomas and Dieter I am nearing the completion of this project. As part of this project, I have written a script that will help install and update Syslinux (similar to that of grub-install).
Some key features of the script: syslinux-install_update.sh
* Install Syslinux to the FS + Partition Boot Loader (extlinux --install /boot/syslinux)
* Install Syslinux MBR
* Detect and optionally set the boot flag on the boot partition
* Update Syslinux – copy files and execute (extilnux --update /boot/syslinux)
* Support for GPT disks
* Support for RAID configurations
The goal is to include this script in the official Syslinux package. Therefore we need your help to test it.
syslinux-install_update.sh -i -a -m ..... install Syslinux, set the boot flag (if needed), and install the MBR
We need tests for the following setups:
/ + /boot on the *same* partition
/ + /boot on the *same* partition - RAID
/boot + root on *separate* partition
/boot + root on *separate* partition - RAID
All of the above using but using the GPT partition layout
NOTE: This is an alpha/beta stage script. The script modifies the first 440 bytes of the disk (using dd) and the partition table (using either sfdisk or sgdisk). Although the script should be safe to run, I am not responsible for any data loss that may occur.
Let us know the following:
* Did the script work for you?
* What was your partition setup? (see above)
* What version did you use?
* If the script did not work, please provide as much information as possible
Get the script here: https://gist.github.com/772138
Syslinux Sample Config File: http://projects.archlinux.org/svntogit/ … slinux.cfg
The Syslinux package in testing includes the above configuration file.
Cheers,
pytherAs Thomas puts it:
Thomas wrote:Syslinux is way more flexible and extensible than grub or lilo, actively developped (by someone who knows what he is doing and is always willing to fix bugs like yours) and feature-rich.
http://mailman.archlinux.org/pipermail/ … 17368.html
In regards to bootloaders in core
Pierre wrote:
ATM. we have grub1 in core/base and install that by default. The problem is that this project is virtually dead for a long time now and also not available on x86_64. Technically it has to be in the multilib repo.
Grub2 is currently in extra. Upstream development is still in flux. Imho its quite heavy and complex. An alternative successor would be extlinux from the syslinux package. It's very simple, easy to configure, actively maintained and reliable. Sure, it only supports booting from ext* and btrfs afaik but to be honest, if you use any other FS you should have a separate /boot even when using grub.
http://mailman.archlinux.org/pipermail/ … 18445.html
Why I like it:
* It is simple and easy to understand (see https://wiki.archlinux.org/index.php/Sy … t_Process)
* The devs are willing to help you out (they have helped me understand the Syslinux boot process and write this script)
* It is modular in nature and the Hardware Detection Tool (HDT) com32 module is cool
* Configuration is simple
* KISS (IMHO)
* GPT Support
Disadvantages:
* Can't boot from LVM volumes
* only ext2/3/4, btrfs, vfat file systems supported
Last edited by pyther (2011-01-16 21:56:41) -
Ihave created a script, i need to email in pdf format.
Hi Experts,
There are 2 criterias...
1. criteria
I have created a script, i need to mail it. Please give me a step by step guide to perform it .. . Please give the comments in all the functional module to be used.
Do we have to write a separate program to send email or in the same program. i'll post my program along with this mail. I'm using this program to display report after delivery on that particular date.
REPORT ZREPORTTOEMAIL LINE-SIZE 400.
data : count, i type i.
TABLES : VBFA, "Sales Document Flow
VBAK,
KNA1,
VBKD,
VBAP,
LIPS,
LIKP,
KONP,
KOMK,
KOMP,
zkna1,
konv.
data : l_vbeln like vbfa-vbeln,
l_posnr like vbfa-posnn,
l_KNUMV like vbak-KNUMV,
L_BILL_ITEM LIKE vbfa-posnn ,
l_netwr like vbrp-netwr,
l_MWSBP like vbrp-mwsbp.
DATA: BEGIN OF TKOMV OCCURS 50.
INCLUDE STRUCTURE KOMV.
DATA: END OF TKOMV.
DATA: BEGIN OF TKOMVD OCCURS 50.
INCLUDE STRUCTURE KOMVD.
DATA: END OF TKOMVD.
TYPE-POOLS: SLIS.
DATA: FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
HEADING TYPE SLIS_T_LISTHEADER,
LAYOUT TYPE SLIS_LAYOUT_ALV,
EVENTS TYPE SLIS_T_EVENT,
REPNAME LIKE SY-REPID,
F2CODE LIKE SY-UCOMM VALUE '&ETA',
G_SAVE(1) TYPE C,
G_EXIT(1) TYPE C,
G_VARIANT LIKE DISVARIANT,
GX_VARIANT LIKE DISVARIANT.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
DATA: BEGIN OF itab occurs 0,
kunnr like likp-kunnr, "ship to party
NAME2 LIKE KNA1-NAME1, "text
ORT01 LIKE KNA1-ORT01, "City
BSTNK LIKE VBAK-BSTNK, "customer P O
BSTDK LIKE VBAK-BSTDK, "date
vbeln like likp-vbeln, "delivery
ernam like likp-ernam, "person
vstel like likp-vstel, "shipping point
vkorg like likp-vkorg, "sales org
lfdat like likp-lfdat, "delivery date
kunag like likp-kunag, "sold to party
NAME1 LIKE KNA1-NAME1, "text
bil_to like VBAK-KUNNR,
name3 like kna1-name1,
traid like likp-traid, "transport/vehicle no
BOLNR LIKE LIKP-BOLNR,
wadat_ist like likp-wadat_ist, "good mov. date
posnr like lips-posnr, "item
matnr like lips-matnr, "material
arktx like lips-arktx, "item text
matkl like lips-matkl, "mat group
werks like lips-werks, "plant
lgort like lips-lgort, "stoage location
lfimg like lips-lfimg, "del qty
MEINS LIKE LIPS-MEINS,
vrkme like lips-vrkme, "sales unit
UMVKZ LIKE LIPS-UMVKZ,
UMVKN LIKE LIPS-UMVKN,
charg like lips-charg, "batch
vgbel like lips-vgbel, "reference doc
mtart like lips-mtart, "mat type
vkbur like lips-vkbur, "sales office
vkgrp like lips-vkgrp, "sales group
vtweg like lips-vtweg, "Distribution Channel
spart like lips-spart, "division
billno like vbak-vbeln,
basic like komvd-kwert,
budat like bkpf-budat,
fin_amt like vbrp-NETWR,
END OF itab.
data : begin of jtab occurs 0,
kunnr like likp-kunnr,
name2 like kna1-name2,
vbeln like likp-vbeln,
zkunnr like zkna1-zkunnr,
zname like zkna1-zname,
end of jtab.
SELECTION-SCREEN SKIP 1 .
SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003.
SELECT-OPTIONS : ABC FOR LIKP-WADAT_IST DEFAULT SY-DATUM
NO INTERVALS .
SELECT-OPTIONS : S_MATNR FOR LIPS-MATNR NO INTERVALS .
SELECT-OPTIONS : S_VKORG FOR LIKP-VKORG NO INTERVALS.
SELECT-OPTIONS : S_VSTEL FOR LIKP-VSTEL NO INTERVALS.
SELECT-OPTIONS : S_VKBUR FOR LIKP-VKBUR NO INTERVALS.
SELECT-OPTIONS : S_VKGRP FOR LIPS-VKGRP.
SELECT-OPTIONS : S_SPART FOR LIPS-SPART.
SELECT-OPTIONS : S_VBELN3 FOR LIKP-VBELN.
SELECT-OPTIONS : S_MATKL FOR LIPS-MATKL NO INTERVALS,
S_KUNAG FOR LIKP-KUNAG.
SELECTION-SCREEN END OF BLOCK BLOCK1.
select * from likp into corresponding fields of itab
WHERE WADAT_IST IN ABC
AND VBELN IN S_VBELN3
AND VKORG IN S_VKORG
and VSTEL in S_VSTEL
AND VKBUR IN S_VKBUR
and lfart like 'Z%'
AND VBTYP = 'J'
AND KUNAG IN S_KUNAG.
select * from lips into corresponding fields of itab
WHERE VBELN = ITAB-VBELN
AND MATNR IN S_MATNR
AND MATKL IN S_MATKL
AND VKBUR IN S_VKBUR
AND VKGRP IN S_VKGRP
AND SPART IN S_SPART.
IF ITAB-VRKME = 'RM' AND ITAB-MEINS = 'KG'.
ITAB-LFIMG = ITAB-LFIMG * ( ITAB-UMVKZ / ITAB-UMVKN ).
ITAB-VRKME = 'KG'.
ENDIF.
SELECT SINGLE BSTNK BSTDK INTO (ITAB-BSTNK,ITAB-BSTDK) FROM VBAK
WHERE VBELN = ITAB-VGBEL.
SELECT SINGLE NAME1 ORT01 FROM KNA1 INTO (ITAB-NAME2,ITAB-ORT01)
WHERE KUNNR = ITAB-KUNNR.
SELECT SINGLE NAME1 FROM KNA1 INTO ITAB-NAME1
WHERE KUNNR = ITAB-KUNAG.
*select single vbeln POSNN into (itab-billno,L_BILL_ITEM) from vbfa where VBELV = itab-vbeln
*and POSNV = itab-posnr and VBTYP_N in ('M','U').
select vbeln POSNN from vbfa up to 1 rows into (itab-billno,L_BILL_ITEM) where VBELV = itab-vbeln
and POSNV = itab-posnr and VBTYP_N in ('M','U') order by vbeln DESCENDING .
endselect.
select single * from vbfa where vbelv = itab-billno and posnv = l_bill_item and
vbtyp_n = 'N'.
if sy-subrc = 0.
clear : itab-billno, l_bill_item.
endif.
select single budat from bkpf into itab-budat where xblnr = itab-billno and
blart = 'RV'.
select single NETWR MWSBP into (l_netwr, l_MWSBP) from vbrp where vbeln = itab-billno
and posnr = l_bill_item.
itab-fin_amt = l_netwr + l_MWSBP.
clear : l_netwr, l_MWSBP.
select single kunnr from vbpa into itab-bil_to where
vbeln = itab-BILLNO and PARVW = 'RE'.
select single name1 into itab-name3 from kna1
where kunnr = itab-bil_to.
*select single VBELV POSNV from vbfa into (l_vbeln,l_posnr)
*where VBELN = itab-vbeln and
*POSNN = itab-posnr and VBTYP_N = 'J'.
*select single VBELN POSNN from vbfa into (l_vbeln,l_posnr)
*where VBELV = itab-vbeln and
*POSNV = itab-posnr and VBTYP_N = 'M'.
select VBELN POSNN from vbfa up to 1 rows into (l_vbeln,l_posnr)
where VBELV = itab-vbeln and
POSNV = itab-posnr and VBTYP_N = 'M' order by vbeln DESCENDING.
endselect.
select single * from vbfa where vbelv = l_vbeln and posnv = l_posnr and
vbtyp_n = 'N'.
if sy-subrc = 0.
clear : l_vbeln, l_posnr.
endif.
if sy-subrc = 0.
*select single KNUMv into l_KNUMv from vbak where vbeln = l_vbeln
select single KNUMv into l_KNUMv from vbRk where vbeln = l_vbeln
select * from konv where knumv = l_knumv and kposn = l_posnr and
kschl in ('ZR00','ZR01','ZR02','ZOBC').
itab-basic = itab-basic + KONV-KBETR.
ENDSELECT.
else.
*select single KNUMv into l_KNUMv from ekko where ebeln = itab-vgbel.
*select single KBETR from konv into itab-basic where knumv = l_knumv
*and kposn = itab-posnr and kschl = 'P101'.
select single KNUMv into l_KNUMv from VBRK where VBELN = itab-BILLNO.
select * from konv where knumv = l_knumv and kposn = l_BILL_ITEM AND
kschl in ('ZR00','ZR01','ZR02','ZOBC').
itab-basic = itab-basic + KONV-KBETR.
ENDSELECT.
*zkna1-zkunnr = itab-kunnr.
*insert zkna1.
endif.
clear : l_vbeln, L_BILL_ITEM, L_POSNR.
APPEND ITAB.
clear : itab-basic, itab-lfimg.
ENDSELECT.
clear : itab.
ENDSELECT.
<b>perform zscript.</b>
*& Form zscript
text
--> p1 text
<-- p2 text
FORM zscript .
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZREPORT2EMAIL'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'MANU'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " zscript
The above one is first criteria just to understand how to send mail to the customers.
<b>Second criteria</b> is i have to send the mail to the particular customer with only their details, the process should continue until it sends to all the customers with their details for that particular date.
Please help me out.
I have seen so many posts in the sdn but not able to understand the functional modules, how they declare that and how does it works...
Please provide me a good material to understand the functional module and to declare them.
Please solve this query i'll reward them with very good points.
Thanks in advance.
A.Rafique.Hi babar haroon,
Thanks for the link.....
I went through that link, i created smart form but i was not able to get the results because the pgm gets terminated after executing. I'll show u the code, the code is active. Please check out and tell me if i have missed anything in the code...
*& Report ZZZ_TEST3
REPORT ZZZ_TEST3.
*internal table declarations
data: i_otf type itcoo occurs 0 with header line,
i_tline type table of tline with header line,
i_receivers type table of somlreci1 with header line,
i_record like solisti1 occurs 0 with header line,
*Objects to send mail.
i_objpack like sopcklsti1 occurs 0 with header line,
i_objtxt like solisti1 occurs 0 with header line,
i_objbin like solisti1 occurs 0 with header line,
i_reclist like somlreci1 occurs 0 with header line,
*workarea declaration.
w_objhead TYPE soli_tab,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
w_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
w_buffer TYPE string,"To convert from 132 to 255
Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
call function 'SSF_FUNCTION_MODULE_NAME'
*call function '/1BCDWB/SF00000105'
exporting
formname = 'ZZZ_TEST2'
importing
fm_name = v_form_name
exceptions
no_form = 1
no_function_module = 2
others = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION '/1BCDWB/SF00000105'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB = itab1
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = wa
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Convert PDF from 132 to 255.
LOOP AT i_tline.
Replacing space by ~
TRANSLATE i_tline USING '~'.
CONCATENATE w_buffer i_tline INTO w_buffer.
ENDLOOP.
Replacing ~ by space
TRANSLATE w_buffer USING '~'.
DO.
i_record = w_buffer.
Appending 255 characters as a record
APPEND i_record.
SHIFT w_buffer LEFT BY 255 PLACES.
IF w_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Refresh: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear w_objhead.
Object with PDF.
i_objbin[] = i_record[].
DESCRIBE TABLE i_objbin LINES v_lines_bin.
Object with main text of the mail.
i_objtxt = 'Find attached the output of the smart form.'.
APPEND i_objtxt.
DESCRIBE TABLE i_objbin LINES v_lines_txt.
i_objtxt = 'Regards,'.
APPEND i_objtxt.
i_objtxt = 'J.Jayanthi'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
Document information.
w_doc_chng-obj_name = 'Smartform'.
w_doc_chng-expiry_dat = sy-datum + 10.
w_doc_chng-obj_descr = 'Smart form output'.
w_doc_chng-sensitivty = 'F'. "Functional object
w_doc_chng-doc_size = v_lines_txt * 255.
Pack to main body as RAW.
Obj. to be transported not in binary form
CLEAR i_objpack-transf_bin.
Start line of object header in transport packet
i_objpack-head_start = 1.
Number of lines of an object header in object packet
i_objpack-head_num = 0.
Start line of object contents in an object packet
i_objpack-body_start = 1.
Number of lines of the object contents in an object packet
i_objpack-body_num = v_lines_txt.
Code for document class
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Packing as PDF.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'Smartform_output' '.pdf'
INTO i_objpack-obj_descr.
i_objpack-doc_size = v_lines_bin * 255.
APPEND i_objpack.
Document information.
CLEAR i_reclist.
e-mail receivers.
i_reclist-receiver = '[email protected]'.
i_reclist-receiver = '[email protected]'.
i_reclist-express = 'X'.
i_reclist-rec_type = 'U'. "Internet address
APPEND i_reclist.
Sending mail.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = w_objhead
contents_hex = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Please reply me back, it is very urgent..
Thanks and regards.
A.Rafique -
Scripting modifications to LDAP inside Python script
Hi all,
I have written Python scripts to create redundant print services on two OS X Server 10.6 machines running print services for al hundred or so macs in computer labs. The Mac printing (which printers appear to users) is managed via MCX w/OD. Essentially how they work is this:
*script periodically tests socket connectivity on primary server IPP/LPR ports
*on failure script does command to start Print Service on backup print server
*script then does command on OD LDAP to import mcx settings for backup print server to all applicable managed clients
The commands are done with "Popen" so they are shell commands. To modify the LDAP directory, I would use the Popen equivalent of "/usr/bin/dscl -u <diradmin user> -P <diradmin pwd> /LDAPv3/127.0.0.1 -mcximport /<managed client path> <path to mcx settings>"
It would be much nicer to not have the auth info hardcoded into the script. I've tried logging in to a shell on the server under the diradmin credentials and running the python script, but get permission denied when trying to modify LDAP. I also tried giving a test user account "full" privileges in WGM to modify directory and running script logged into a shell as this user, with the same failure.
I may be missing something totally obvious, but I am coming up blank..
Is there any way to script modification to the LDAP directory without supplying credentials in the script?Hi all,
I have written Python scripts to create redundant print services on two OS X Server 10.6 machines running print services for al hundred or so macs in computer labs. The Mac printing (which printers appear to users) is managed via MCX w/OD. Essentially how they work is this:
*script periodically tests socket connectivity on primary server IPP/LPR ports
*on failure script does command to start Print Service on backup print server
*script then does command on OD LDAP to import mcx settings for backup print server to all applicable managed clients
The commands are done with "Popen" so they are shell commands. To modify the LDAP directory, I would use the Popen equivalent of "/usr/bin/dscl -u <diradmin user> -P <diradmin pwd> /LDAPv3/127.0.0.1 -mcximport /<managed client path> <path to mcx settings>"
It would be much nicer to not have the auth info hardcoded into the script. I've tried logging in to a shell on the server under the diradmin credentials and running the python script, but get permission denied when trying to modify LDAP. I also tried giving a test user account "full" privileges in WGM to modify directory and running script logged into a shell as this user, with the same failure.
I may be missing something totally obvious, but I am coming up blank..
Is there any way to script modification to the LDAP directory without supplying credentials in the script? -
Custom Calculation Script Help Needed
I need to make a script that Sums a column of fields based on whether or not information found in another column of fields is the same or specific text. Please see below screenshot of what I would like it to do.
I would like a Sum of all Amounts that have the Code A...You can use this script as the custom calculation script of "SumOfA":
var total = 0;
for (var i=0; i<=2; i++) {
if (this.getField("p1TC."+i).value=="Code A")
total+=Number(this.getField("p1RecIn."+i).value);
event.value = total;
You can easily adjust it for the other field as well. -
Automatic measures only in 1 color ink (script modification)
Hi all,
I would need to modify this script so that put the measure already in es.. PANTONE Pantone 485 (solid coated),
I need to change this string, but do not know how...
thanks very much
// measurement line color
var color = new RGBColor; how to change it, to put ink pantone ....?
color.green = 255;
color.blue = 0;
* Description: An Adobe Illustrator script that automates measurements of objects. This is an early version that has not been sufficiently tested. Use at your own risks.
* Usage: Select 1 to 2 page items in Adobe Illustrator, then run this script by selecting File > Script > Other Scripts > (choose file)
* License: GNU General Public License Version 3. (http://www.gnu.org/licenses/gpl-3.0-standalone.html)
* Copyright (c) 2009. William Ngan.
* http://www.metaphorical.net
// Create an empty dialog window near the upper left of the screen
var dlg = new Window('dialog', 'Spec');
dlg.frameLocation = [100,100];
dlg.size = [250,250];
dlg.intro = dlg.add('statictext', [20,20,150,40] );
dlg.intro.text = 'First select 1 or 2 items';
dlg.where = dlg.add('dropdownlist', [20,40,150,60] );
dlg.where.selection = dlg.where.add('item', 'top');
dlg.where.add('item', 'bottom');
dlg.where.add('item', 'left');
dlg.where.add('item', 'right');
dlg.btn = dlg.add('button', [20,70,150,90], 'Specify', 'spec');
// document
var doc = activeDocument;
// spec layer
try {
var speclayer =doc.layers['spec'];
} catch(err) {
var speclayer = doc.layers.add();
speclayer.name = 'spec';
// measurement line color
var color = new RGBColor;
color.green = 255;
color.blue = 0;
// gap between measurement lines and object
var gap = 2;
// size of measurement lines.
var size = 10;
// number of decimal places
var decimals = 0;
// pixels per inch
var dpi = 72;
Start the spec
function startSpec() {
if (doc.selection.length==1) {
specSingle( doc.selection[0].geometricBounds, dlg.where.selection.text );
} else if (doc.selection.length==2) {
specDouble( doc.selection[0], doc.selection[1], dlg.where.selection.text );
} else {
alert('please select 1 or 2 items');
dlg.close ();
Spec the gap between 2 elements
function specDouble( item1, item2, where ) {
var bound = new Array(0,0,0,0);
var a = item1.geometricBounds;
var b = item2.geometricBounds;
if (where=='top' || where=='bottom') {
if (b[0]>a[0]) { // item 2 on right,
if (b[0]>a[2]) { // no overlap
bound[0] =a[2];
bound[2] = b[0];
} else { // overlap
bound[0] =b[0];
bound[2] = a[2];
} else if (a[0]>=b[0]){ // item 1 on right
if (a[0]>b[2]) { // no overlap
bound[0] =b[2];
bound[2] = a[0];
} else { // overlap
bound[0] =a[0];
bound[2] = b[2];
bound[1] = Math.max (a[1], b[1]);
bound[3] = Math.min (a[3], b[3]);
} else {
if (b[3]>a[3]) { // item 2 on top
if (b[3]>a[1]) { // no overlap
bound[3] =a[1];
bound[1] = b[3];
} else { // overlap
bound[3] =b[3];
bound[1] = a[1];
} else if (a[3]>=b[3]){ // item 1 on top
if (a[3]>b[1]) { // no overlap
bound[3] =b[1];
bound[1] = a[3];
} else { // overlap
bound[3] =a[3];
bound[1] = b[1];
bound[0] = Math.min(a[0], b[0]);
bound[2] = Math.max (a[2], b[2]);
specSingle(bound, where );
spec a single object
@param bound item.geometricBound
@param where 'top', 'bottom', 'left,' 'right'
function specSingle( bound, where ) {
// width and height
var w = bound[2]-bound[0];
var h = bound[1]-bound[3];
// a & b are the horizontal or vertical positions that change
// c is the horizontal or vertical position that doesn't change
var a = bound[0];
var b = bound[2];
var c = bound[1];
// xy='x' (horizontal measurement), xy='y' (vertical measurement)
var xy = 'x';
// a direction flag for placing the measurement lines.
var dir = 1;
switch( where ) {
case 'top':
a = bound[0];
b = bound[2];
c = bound[1];
xy = 'x';
dir = 1;
break;
case 'bottom':
a = bound[0];
b = bound[2];
c = bound[3];
xy = 'x';
dir = -1;
break;
case 'left':
a = bound[1];
b = bound[3];
c = bound[0];
xy = 'y';
dir = -1;
break;
case 'right':
a = bound[1];
b = bound[3];
c = bound[2];
xy = 'y';
dir = 1;
break;
// create the measurement lines
var lines = new Array();
// horizontal measurement
if (xy=='x') {
// 2 vertical lines
lines[0]= new Array( new Array(a, c+(gap)*dir) );
lines[0].push ( new Array(a, c+(gap+size)*dir) );
lines[1]= new Array( new Array(b, c+(gap)*dir) );
lines[1].push( new Array(b, c+(gap+size)*dir) );
// 1 horizontal line
lines[2]= new Array( new Array(a, c+(gap+size/2)*dir ) );
lines[2].push( new Array(b, c+(gap+size/2)*dir ) );
// create text label
if (where=='top') {
var t = specLabel( w, (a+b)/2, lines[0][1][1] );
t.top += t.height;
} else {
var t = specLabel( w, (a+b)/2, lines[0][0][1] );
t.top -= t.height;
t.left -= t.width/2;
// vertical measurement
} else {
// 2 horizontal lines
lines[0]= new Array( new Array( c+(gap)*dir, a) );
lines[0].push ( new Array( c+(gap+size)*dir, a) );
lines[1]= new Array( new Array( c+(gap)*dir, b) );
lines[1].push( new Array( c+(gap+size)*dir, b) );
//1 vertical line
lines[2]= new Array( new Array(c+(gap+size/2)*dir, a) );
lines[2].push( new Array(c+(gap+size/2)*dir, b) );
// create text label
if (where=='left') {
var t = specLabel( h, lines[0][1][0], (a+b)/2 );
t.left -= t.width;
} else {
var t = specLabel( h, lines[0][0][0], (a+b)/2 );
t.left += size;
t.top += t.height/2;
// draw the lines
var specgroup = new Array(t);
for (var i=0; i<lines.length; i++) {
var p = doc.pathItems.add();
p.setEntirePath ( lines[i] );
setLineStyle( p, color );
specgroup.push( p );
group(speclayer, specgroup );
Create a text label that specify the dimension
function specLabel( val, x, y) {
var t = doc.textFrames.add();
t.textRange.characterAttributes.size = 8;
t.textRange.characterAttributes.alignment = StyleRunAlignmentType.center;
var v = val;
switch (doc.rulerUnits) {
case RulerUnits.Inches:
v = val/dpi;
v = v.toFixed (decimals);
break;
case RulerUnits.Centimeters:
v = val/(dpi/2.54);
v = v.toFixed (decimals);
break;
case RulerUnits.Millimeters:
v = val/(dpi/25.4);
v = v.toFixed (decimals);
break;
case RulerUnits.Picas:
v = val/(dpi/6);
var vd = v - Math.floor (v);
vd = 12*vd;
v = Math.floor(v)+'p'+vd.toFixed (decimals);
break;
default:
v = v.toFixed (decimals);
t.contents = v;
t.top = y;
t.left = x;
return t;
function setLineStyle(path, color) {
path.filled = false;
path.stroked = true;
path.strokeColor = color;
path.strokeWidth = 0.5;
return path;
* Group items in a layer
function group( layer, items, isDuplicate) {
// create new group
var gg = layer.groupItems.add();
// add to group
// reverse count, because items length is reduced as items are moved to new group
for(var i=items.length-1; i>=0; i--) {
if (items[i]!=gg) { // don't group the group itself
if (isDuplicate) {
newItem = items[i].duplicate (gg, ElementPlacement.PLACEATBEGINNING);
} else {
items[i].move( gg, ElementPlacement.PLACEATBEGINNING );
return gg;
dlg.btn.addEventListener ('click', startSpec );
dlg.show();Sambaflex schrieb:
… ALL attributes with track and filling overprint …
use:
t.textRange.characterAttributes.overprintFill = true;
and:
path.strokeOverprint = true;
Sambaflex schrieb:
… Now I also need to put the words and two arrows in pantone .... is it possible? …
Partially.
You can change this lines:
function setLineStyle(path, color) {
path.filled = false;
path.stroked = true;
add this:
path.strokeColor = color;
path.strokeOverprint = true;
path.strokeWidth = 0.5;
return path;
and here:
function specLabel( val, x, y) {
var t = doc.textFrames.add();
t.textRange.characterAttributes.size = 8;
t.textRange.characterAttributes.alignment = StyleRunAlignmentType.center;
add this:
t.textRange.characterAttributes.fillColor = color;
t.textRange.characterAttributes.overprintFill = true;
Not so easy are IMHO the arrows.
You can apply a graphic style with arrows. (The style must be exist in your document.)
The other way is to draw an arrow (triangle) like this:
http://forums.adobe.com/message/5728992#5728992
and move it to the beginning of the line, then duplicate, rotate and move to the end of the line.
Hope, this will help you. -
Hyperlink Scripting Solution Needed
Perhaps there is already a way to do this that I am missing that doesn't involve scripting, but I will post here nonetheless. I am in need of a script or extension that takes all the product numbers I have on a page (they can easily be found with GREP..are usually ISBNs) and attaches the appropriate URL to them so they will be linked to products on our website. I have the current data source with each product, product number, and it's URL in Excel format.
Any suggestions would be appreciated as I have been copying and pasting for quite some time and I still have 200 pages to go. Thanks in advance!What you could try is:
Find with a GREP all product numbers. Change (also with GREP) to the
full URL that you need -- I presume this is simply a question of adding
some sort of URL prefix to the product number.
Then run InDesign's automatic "Create hyperlinks" command.
Then GREP out the URL part again, leaving only the original product
number (easy to do if you gave it a different color or something initially).
If that doesn't work, sounds like you would need a script. -
Modification needed in scrollbar in flash 8 file
i am a newbie flash designer. a client has asked me to make modifications in a flash file used on his website. it is flash 8 actionscript. i am currently working on the same and would appreciate your help. the client has given me 'proprietorytools.swf' file which i decompiled using sothink decompiler 4.5 build 90120 to '~proprierarytools original.fla'. the xml folder resides in the same folder as ~proprierarytools original.fla. it contains proprierarytools.xml. you can download these files at http://rapidshare.com/files/252995106/scrollbar_questions.zip
i discovered a problem - if you view 'proprietorytools.swf' - when you click on 'aims', you can see that the scrollbar works perfectly. when you click on advigil, you can see that the scrollbar is faulty. it starts lower than the other links scollbars and has no thumb. the entire text in the xml file is not displayed.
please help me to resolve this problem.
my additional questions are:
has the creator of the swf file use some unique scrollbar code or is this scrollbar provided in flash itself. in this case, i can read a tutorial to understand it better.
is it possible to copy the scrollbar code from the links where it works, to advigil, where it doesnt work
is this an easy bug to resolve or is it difficult?
i have given 'scrollbar works.jpg' and 'scrollbar doesnt work.jpg' to further explain my query.
please tell me if i have explained my problem properly or further clarifications are needed.the screenshots and all relevant files are contained in http://rapidshare.com/files/252995106/scrollbar_questions.zip, but i am attaching them to this post for your benefit.
-
Report Script Help Needed - Data Extract
Hi,
I have a cube with 11 dims: Account, Period, Resource, Facility, SSSS, CCCC, Activity, Years, Version, Scenario, Charges
I need a report script that will extract data for a certain year and scenario only. I have not written a report script in a long time and have the following thus far. However it's not extracting data that I know exists. Can anyone help? Thanks is advance. This runs but I just get a blank screen or file....
//ESS_LOCALE English_UnitedStates.Latin1@Binary
// This report script extracts data from cube
"FY11"
{DECIMAL 4}
{NAMEWIDTH 25}
{SUPCOMMAS}
{SUPBRACKETS}
{SUPPAGEHEADING}
{NOINDENTGEN}
{SUPMISSINGROWS}
{SUPZEROROWS}
{TABDELIMIT}
{SUPFEED}
{ROWREPEAT}
"JAN"
"FEB"
"MAR"
//"APR"
//"MAY"
//"JUN"
//"JUL"
//"AUG"
//"SEP"
//"OCT"
//"NOV"
//"DEC"
"BUDGET"
// This is the members of the CCCC dimension to extract
// This is the members or the ACCOUNT dimension to extract
!Hello -
You can try/modify the code below and see if this works -
//ESS_LOCALE English_UnitedStates.Latin1@Binary
{ SUPMISSINGROWS }
{ SUPZEROROWS }
{ SUPFEED, SUPBRACKETS, SUPCOMMAS }
{ NOINDENTGEN }
{ DECIMAL 4}
{ NAMEWIDTH 30 }
{ ROWREPEAT }
{ TABDELIMIT }
{MISSINGTEXT "-" }
<PAGE ("Scenario", "Resource", "Facility" ,"SSSS", "Activity", "Version", "Charges")
"Budget"
"Resource"
"Facility"
"SSSS"
"Activity"
"Version"
"Charges"
<COLUMN ("Year","Period")
"FY11"
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
<ROW ("Account", "CCCC")
<LINK (<DESCENDANTS ("ACCOUNT") AND <LEV("ACCOUNT",0))
<LINK (<DESCENDANTS ("RT9_CCCC") AND <LEV("CCCC",0))
Here you may want to change teh combination in the Page dimensions for eg -
I know for Scenario you want Budget
But for Version should it be "Version" or may be "Working" Or "Final" or any other version dimension member ...?
Same way modify the dimension memebres for other dimensions.
Regards
Edited by: Rosi on Aug 24, 2009 10:01 AM
Edited by: Rosi on Aug 24, 2009 10:02 AM -
TCL script help needed on Nexus7000 !
Does anyone know how to create a TCL script on Nexus7000 switch for following scenario ? Need urgent help here.. :-
Here is what I am trying to do :-
1. Whenever following log on "show log log" prints out :-
testnexus7000 %PIXM-2-PIXM_SYSLOG_MESSAGE_TYPE_CRIT:
2. Print out the output of show system internal pixm errors
And look for following line :-
[102] pixm_send_msg_mcast(1208): MTS Send to LC X failed >> where X is 0 based
and this error can occur multiple times for different LCs too.
4. Reload line card (s) X and syslog " task done"
Regards
VijayaHi,
Vijaya I found same post on support cisco forums So people helped someone in same question !!!!!!
Please read it ....
https://supportforums.cisco.com/thread/2128886
Yes plus if u can help me in ......Cisco ASA same security problem than that will be good for me .....I will contact u and will be great help for me if u help
Hope that link help u .....
Bye, -
I'm working on a form. What I need it to do is this:
The end user will check a box to add comments. The comments field is NOT visable until the check box is checked. Once the checkbox is checked then a text box will appear directly underneath it.
Thank you in advance!
SRenaedo you mean where are the textbox and checkbox located on my form or in the hierarchy?
I have the checkbox and textbox in their own subform.
if
(Checkbox1.rawValue==1) Textfield1.presence="visible"
elseTextfield1.presence
="hidden"
Sorry that I'm being a pain! I'm not well-versed in scripting if that isn't obvious! ;-) -
Hi,
I have a requirement in SAP E-Sourcing as follows to achieve the functionality of hiding/displaying a field based on another field value selection.
Based on my field value FIELDA, I need to display or hide FIELDB/FIELDC.
1. FIELDA -- Value List (ValueA, ValueB, ValueC)
2. FIELDB -- Text Field
3. FIELDC -- Text Field
So,my requirement is
if (FIELDA = "ValueA")
FIELDB = Hide
FIELDC = Display
else
FIELDB = Display
FIELDC = Hide
Kindly direct me how to achieve this functionality using "Script Definition"
Thanks,
PrabhuHi Prabhu,
To achieve your requirement, you cannot write a script, as there is no API for dynamic UI.
Your requirement is very much possible by Page Customization.
Create page customization if already not existing for the object where you want to do this.
In that add the field as below
Field ID : technical name of the field which needs to be hidden (FieldB)
Property : Hidden
Value: Yes
Dimension on parent : NO
Dimension Field: Conditional Field (FieldA)
Dimension Type : Value list Value (in ur case)
Dimension Value: ValueA
In this way you have to configure all possible combinations required.
Hope you get this.
Thanks,
Vaibhav Modi -
UCCX Conferencing in third call? Scripting help needed
All,
I've got a customer requirement where they want to be able to place a call into the contact centre, give the contact centre the digits to dial and have the contact centre place the call on their behalf. I've got no trouble with that bit.
The next requirement is that the call placed is recorded, even if the calls in are not from cisco phones (i.e. mobiles). We have a redbox recorder that does the recording and in order for it to commence a recording session, it needs to see a setup message through CM to check that it's an extension that is to be recorded.
For example, I use an IP phone that IS being monitored to make a call. The Redbox sees the setup and will record the call flow.
I use an IP phone that is NOT being monitored to make a call. The Redbox sees the setup and will not record the call.
In order to get calls recorded from the contact centre, I'm thinking of conferencing in a third phone that Redbox is set to record and have it auto answer on silent, but I can't figure out how to get the three calls conferenced together to keep the call flow recorded.
Any thoughts on how to achieve this? Or has anyone else out there used another method?
All help greatly appreciated!
LH
#15331There is no mechanism within CCX that allows you to initiate a conference or join two contacts together. Your only options will be to transfer the triggerin
g contact to another destination with a Call Redirect or Call Consult Transfer. If you create a second contact and use a Place Call step, you can interact with both contacts in the script but never join them together. -
IDCS5 to PS script - I need your help...
Hi there
I have been given a script by someone in the ID forum (who is happy that I ask you gurus here for some help with it) - you can download it here (I hope) https://www.yousendit.com/download/ZGJlRm96MGNCSWMwTVE9PQ.
Basically what it does at the moment is takes an ID doc, pop it through a PDF setting and make it come out in PS with every layer group as a separate layer, maintaining transparency.
This is almost perfect for my needs. Almost.
I wondered if there was a way to make it work better for IDCS5 (it was scripted for IDCS3). In IDCS5 every object is listed as a layer (much like PS and AI).
It would be amazing if the script could create a PS doc that would have every layer from ID replicated, and the layer groups created just as they are in ID also.
For example, if I am building a website, I may have 3 layer groups - "Navigation" "Copy" and "Images" - within each would be multiple elements. If I could run the script and end up with the same layer groups and their internal layers it would be incredible.
Thanks for any help.
Kind regards
TomCan nobody help?
Pretty please?? -
Modification needed in flash file
i am a newbie flash designer. a client has asked me to make modifications in a flash file used on his website. i am
currently working on the same and would appreciate your help. the client has given me 'about.swf' file which i decompiled
using sothink decompiler 4.5 build 90120 to '~about original.fla'. the xml folder resides in the same folder as ~about
original.fla. it contains about_us.xml.you can download these files at
http://rapidshare.com/files/251775121/online_questions.zip
the change the client wants is as follows - if you view 'about.swf' - when you click on 'key people', the details of 4 people
are given - vivek lakhwara, arun goswami, haresh nayak and ss balaji. he wants 2 more peoples names and details to be added.
this means adding 2 more names in the top menu (which displays the persons details on mouseover) which currently contains 4
names and on mouseover their picture and details should appear similar to existing 4 persons
i have given 'required changes.jpg' to further explain my query.
please tell me if i have explained my problem properly or further clarifications are needed.It's highly unlikely anyone here is going to do the work for you, but here's something to start from. You need to edit Sprite 145. It does not involve any xml. You will have to do some investigation of how the current people are done to figure out how to add in the two additional people and the buttons for them, but it appears to all be contained as static content in Sprite 145.
Maybe you are looking for
-
Updates to the Reference Library
I have a large number of photos that I manage using Aperture. The photos are stored outside of Aperture in directories within Finder. There are occasions where I update a photo outside of Aperture (using Photoshop) and the save the item back in in th
-
Formatting a Footnote in RH, integrated from FM
I am using TCS. I have created a FM book with footnotes. When I import the FM book (by reference) into RH, I am unable to format the footnote. I can format the body level text, chapters, headings, cell body, cell heading, etc etc... but I don't seem
-
Font and size changes in design view don't appear
I am using the trial version of Dreamweaver CS3 on my G5 Mac (Leopard), and whenever I make changes to the font and font size, it does not appear in the design- although the code is there (in both the css that I create or specific to the paragraph) a
-
Ich versuche es mal auf Deutsch. Ich wandle soeben meine Tonbänder auf MP3 um mit Magix und dabei passiert folgendes: Ich habe die Lieder importiert, meine Marker gesetzt und wenn ich das abspiele höre ich das Lied ( Text) dann Pause mein Marker ist
-
Cannot download Elements 10 and Premiere Elements 10
I can't get past the My Orders Page. When I click on the download button nothing happens. I am running Windows 7. I tried using a wired connection instead of wireless and I tried turning off some of my security. The debug file in the Akamai folde