OSA:Help needed to make a BAdi work
Hi All..
I need a help regarding the BAdi..i am using the Average BAdi in a column...I have a criterion group called critical attributes and under this there are 5 criterions..i need to insert the BAdi in the Criterion group Critical Attributes and the BAdi needs to calculate the values of the criterions and show the result in the criterion group...
I had done the same thing for the other criterion group and the BAdi was working fine..but the BAdi is not working when i insert it in Critical Attributes criterion group....I contacted some people and they told that it is a configuration issue..so please help me out with a solution...and also the configuration which i need to do to make the BAdi work....
Hi Maurice..
I am using the BAdi in an enabled column..i have already used the average Badi in a different criterion group called Performance Rating..It is working fine there...there is no difference between the 2 criterion groups...but somehow it is not working here...i really dont know what is the configuration issue since i am a technical guy...
I will tell u the issue using an example...
I have a criterion group Critical Attributes in which i have inserted the BAdi in the score column......
Under this i have 5 attributes like Accountability,Communication...etc..
The manager appraises the above attributes in the FAPP column...The Badi has to calculate the average of the 5 columns...
I have used the same average BAdi in another criterion group and it is working fine..
so please help me out with the answer..we r using ECC 5.0 version...
Similar Messages
-
HOW LONG TIME YOU NEED TO MAKE GPS TO WORK WITH OV...
Question to NOKIA:
HOW LONG TIME YOU NEED TO MAKE GPS TO WORK WITH OVI MAP 3.1 in N97?
On all N97 I know and as you can read here in forum the GPS doesn't work usable in N97 and with MAP 3.1.
I believe that this is a software problem because often I get a GPS signal inhouse and in the wood, but from one second to the other N97 lost the GPS signal. And this in the best weather condition under free sky. Sometimes gps signal works for 15 minutes, then the signal will drop every minute or so.
The current position on map is shift (past) abaout 40-50 meters from the real position, so its unable to use.
The calculated speed is always changing between 0 and the current speed.
I have updated phone to de newes software and firmware also to ne newest maps also has hard reseted and reformatet and the problem ist still the same. If I switch off the option "Maps improvment" (which SENDS DATA TO NOKIA!!!) the the drop outs are fewer. But evreytime the position on maps is shift about 40-50 Meters from right position. Is there a mistake in calculation the position? Also the speed is jumping sometimes from 0 to x and back.
CAN NOKIA TELL US WHEN THIS BUG WILL BE FIXED, AND CAN NOKIA OFFER US A REFUND.
I have payed a lot for N97 and alot for the navigation licence and a lot for accesoires and a lot for the traffic security assistance. So I want a working phone! I dint have payed money for e alpha-stadium phone.
If this is realy the quality of nokia phone, then It is the latest phone I have buyed from nokia.
By the way, the phone has many many many many other bugs as described in this forum.
Really bad work NOKIA! :-(
I was so excited with my N95 and now this mess...
NOKIA please answer us forum members, what you plan to do with the N97 bugs. When we can hope that the bugs are gone? Otherwise I will return my phone and want my money back and I sue for compensation.I have no word to disagree with you and hoping that Nokia soon will make some press statement or something else to tell us what they do with their flagship, sorry bugship Nokia N97.
Could be a shame recognize errors, but it's worst not to say nothing ant let the bad news of Nokia N97 spread for internet even if they want to sell a Nokia N97 Mini in the near future.
I understand and supose that we will no have no new version till september because we are in the last week and july and the activity in august decrease really high... but at least someone of Nokia could tell something about this problems and if it's possible all the other problems.
Why Nokia Beta Labs Forum there is a direct contact with Nokia workers, and in discussions is relly rare to find?
Yesterday is history.
Tomorrow is a mistery.
Today is a gift. -
guys i need to get my itunes account unlocked its stopping mefor making in app purchases please help need to make a purchase within 30 minutes
If you've tried to buy something and your've been charged for it (and it's not a temporary store holding charge) but haven't received it then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption -
My i phone got stolen.. can you help me to make it not working ?
hello
my cell phone got stolen then i want to make it not working so that it dose not beneft the thief.
can you help me , pls?No. If you set up the "Find my iPhone" service on the phone before it went missing, log on to http://www.icloud.com. If it's still online and hasn't been wiped yet, you can lock it, wipe it, trace it's location, from there.
There is no other way to do it.
Report the theft to your carrier and the police. -
Help needed in debugging the BADI: BBP_CREATE_REQ_BACk
Hi,
I need help in debugging a BADI which causing an error ' SE142 please enter quantity in line 3000111'.
This happens only when number items in the cart are more than four and only for Service category items for which we have this BADI, if the items were less than or equal to 4, follow on document is created.
Please let me know what could be the error.
Thank you,
Manyam
METHOD if_ex_bbp_create_req_back~fill_req_interface.
Method Parameters:
*LOGICAL_SYSTEM TYPE BBP_BACKEND_DEST-LOG_SYS OPTIONAL
*REQ_ITEMS TYPE BBP_REQ_ITEM_SPOOL
*REQ_ITEM_ACCOUNT TYPE BBP_REQ_ACCT_SPOOL
*REQ_ITEM_TEXT TYPE BBP_REQ_TEXT_SPOOL
*REQ_LIMITS TYPE BBP_REQ_LIMITS_SPOOL
*REQ_CONTRACT_LIMITS TYPE BBP_REQ_LIMITS_CONTR_SPOOL
*REQ_SERVICES TYPE BBP_REQ_SERV_SPOOL
*REQ_SERV_ACCOUNT TYPE BBP_REQ_SERV_ACC_SPOOL
*REQ_SERV_TEXT TYPE BBP_REQ_SERV_TEXT_SPOOL
*REQ_ADDRDELIVERY TYPE BBP_REQ_ADDRDELIVERY_SPOOL
This is the logic to create a Service Requisition based on a service
material group selected in the Shopping Cart. This logic is based on
SAP's standard function SPOOL_RQ_READ_BAPI_EXPORTS from which this
BADI is called.
INSERT FUNCTION SPOOL_RQ_READ_BAPI_EXPORTS TO REPROCESS DATA FOR
SERVICE SPECIAL REQUESTS. -- IOK 07/13/01
*function spool_rq_read_bapi_exports.
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(REQNO) LIKE REQHEAD-REQNO
*" VALUE(REQUIS_NUMBER) LIKE BAPIEBANC-PREQ_NO
*" EXPORTING
*" VALUE(SKIP_ITEMS_WITH_ERROR) LIKE BAPIMMPARA-SELECTION
*" VALUE(LOGICAL_SYSTEM) LIKE BBP_BACKEND_DEST-LOG_SYS
*" TABLES
*" REQUISITION_ITEMS STRUCTURE BAPIEBANC
*" REQUISITION_ACCOUNT_ASSIGNMENT STRUCTURE BAPIEBKN
*" REQUISITION_ITEM_TEXT STRUCTURE BAPIEBANTX
*" REQUISITION_LIMITS STRUCTURE BAPIESUHC
*" REQUISITION_CONTRACT_LIMITS STRUCTURE BAPIESUCC
*" REQUISITION_SERVICES STRUCTURE BAPIESLLC
*" REQUISITION_SRV_ACCASS_VALUES STRUCTURE BAPIESKLC
*" RETURN STRUCTURE BAPIRETURN
*" REQUISITION_SERVICES_TEXT STRUCTURE BAPIESLLTX
*" REQUISITION_ADDRDELIVERY STRUCTURE BBPS_RQADDRDELIVERY_46
*" CONTROL_RECORD STRUCTURE BBP_CONTROL_RECORD
*" EXCEPTIONS
*" INTERNAL_ERROR
---- Data Declaration - from LBBP_BS_RQTOP -
- Header -
DATA: reqheader TYPE reqhead.
- Header services -
DATA: reqheaders TYPE reqheads.
- References -
TYPES: reqreferences_type TYPE reqref.
DATA: reqreferences TYPE STANDARD TABLE OF reqreferences_type
INITIAL SIZE 10.
DATA: l_reqreferences TYPE reqreferences_type,
x_reqreferences TYPE reqreferences_type.
- Administrative lines requirement request -
TYPES: reqlines_type TYPE reqline.
DATA: reqlines TYPE STANDARD TABLE OF reqlines_type
INITIAL SIZE 10.
DATA: l_reqlines TYPE reqlines_type.
- MRO-Lines requirement request -
TYPES: reqlinemas_type TYPE reqlinema_eci.
DATA: reqlinemas TYPE STANDARD TABLE OF reqlinemas_type
INITIAL SIZE 10.
DATA: l_reqlinemas TYPE reqlinemas_type.
- SRV-Lines requirement request -
TYPES: reqlinesrs_type TYPE bbps_reqlinesr_eci.
DATA: reqlinesrs TYPE STANDARD TABLE OF reqlinesrs_type
INITIAL SIZE 10.
DATA: l_reqlinesrs TYPE reqlinesrs_type.
- Texts requirement request -
TYPES: reqtexts_type TYPE reqtext.
DATA: reqtexts TYPE STANDARD TABLE OF reqtexts_type
INITIAL SIZE 10.
DATA: l_reqtexts TYPE reqtexts_type.
*- Delivery address
TYPES: reqaddress_type TYPE reqaddress.
DATA: reqaddress TYPE STANDARD TABLE OF reqaddress_type
INITIAL SIZE 10.
DATA: l_reqaddress TYPE reqaddress_type.
- Account assignment requirement request -
TYPES: reqaccts_type TYPE reqacct_470.
DATA: reqaccts TYPE STANDARD TABLE OF reqaccts_type
INITIAL SIZE 10.
DATA: l_reqaccts TYPE reqaccts_type.
- tablekey with the shortlife-line -
DATA: BEGIN OF shortkey,
client TYPE ec_client, "REQLINE-CLIENT,
reqno TYPE ec_reqno, "REQLINE-REQNO,
reqsline TYPE reqsline, "REQLINE-REQSLINE,
reqlline TYPE reqlline, "REQLINE-REQLLINE,
END OF shortkey.
- tablekey with the longlife-line -
DATA: BEGIN OF longkey,
client TYPE ec_client, "REQLINE-CLIENT,
reqno TYPE ec_reqno, "REQLINE-REQNO,
reqlline TYPE reqlline, "REQLINE-REQLLINE,
END OF longkey.
DATA: BEGIN OF bankey,
preq_no TYPE banfn, "BAPIEBAN-PREQ_NO,
preq_item TYPE bnfpo, "BAPIPOGN-PREQ_ITEM,
END OF bankey.
any other working fields
DATA: h_preq_item TYPE bnfpo, "BAPIEBANC-PREQ_ITEM,
h_srv_item TYPE bnfpo, "BAPIEBANC-PREQ_ITEM,
h_logsys TYPE log_system. "reqref-logical_system.
DATA: h_serial_no TYPE dzebkn. "BAPIEBKN-SERIAL_NO.
DATA: h_packno_item TYPE packno, "BAPIESLL-PCKG_NO,
h_packno_srv TYPE packno, "BAPIESLL-PCKG_NO,
h_introw TYPE srv_line_no, "BAPIESLL-LINE_NO,
h_serial_no_srv TYPE dzekkn, "BAPIESKN-SERIAL_NO,
h_srv_outl_created,
next TYPE i,
h_index LIKE sy-tabix,
h_wempf TYPE wempf. "bapiekkn-gr_rcpt.
------ End of std data declaration -
DATA: l_req_items TYPE bapiebanc,
l_req_item_account TYPE bapiebkn,
l_req_item_text TYPE bapiebantx,
l_req_limits TYPE bapiesuhc,
l_req_contract_limits TYPE bapiesucc,
l_req_services TYPE bapiesllc,
l_req_serv_account TYPE bapiesklc,
l_req_serv_text TYPE bapieslltx,
l_req_addrdelivery TYPE bbps_rqaddrdelivery_46.
DATA:
old_req_items TYPE STANDARD TABLE OF bapiebanc,
old_req_item_account TYPE STANDARD TABLE OF bapiebkn,
old_req_item_text TYPE STANDARD TABLE OF bapiebantx,
old_req_limits TYPE STANDARD TABLE OF bapiesuhc,
old_req_contract_limits TYPE STANDARD TABLE OF bapiesucc,
old_req_services TYPE STANDARD TABLE OF bapiesllc,
old_req_serv_account TYPE STANDARD TABLE OF bapiesklc,
old_req_serv_text TYPE STANDARD TABLE OF bapieslltx,
old_req_addrdelivery TYPE STANDARD TABLE OF
bbps_rqaddrdelivery_46.
DATA: l_mat_group TYPE comm_category-category_id.
DATA: f_change_required TYPE c,
f_limit_change TYPE c,
f_mat_sr_change TYPE c,
f_first_change TYPE c VALUE 'X'.
Data declaration for Shopping Cart number and PO number
DATA: reqno TYPE ec_reqno,
requis_number TYPE banfn.
DATA: l_current_item TYPE bnfpo,
line_item(5) TYPE n.
---- Begin Processing ----
DATA: l_requis_number TYPE banfn. "jms 022802
DEBUG TOOL ****** Goto SM50
*data: i type i value 1.
*while i <> 0.
i = i + 1.
*endwhile.
END DEBUG TOOL *******
Get Req Number and Shopping Cart Number
read table req_items into l_req_items index 1.
requis_number = l_req_items-preq_no.
select single reqno
into (reqno)
from reqref
where refnumber = requis_number.
read detailed data from the requirement request
call function 'BBP_REQREQ_GETDETAIL'
EXPORTING
reqno = reqno
IMPORTING
req_header = reqheader
req_header_srv = reqheaders
TABLES
req_reference = reqreferences
req_line = reqlines
req_line_mat = reqlinemas
req_line_srv = reqlinesrs
req_text = reqtexts
req_acct = reqaccts
req_address = reqaddress
EXCEPTIONS
not_found = 1
foreign_lock = 2
no_enqueue_possible = 3
others = 4.
if sy-subrc <> 0.
raise internal_error.
exit.
endif.
Begin JMS
PO_NUM = PO_HEADER-PO_NUMBER.
CMH Data declaration
TYPES: et_header TYPE bbp_pds_sc_header_d.
DATA: t_et_header TYPE STANDARD TABLE OF et_header INITIAL SIZE 0,
x_et_header TYPE et_header.
TYPES: et_item TYPE bbp_pds_sc_item_d.
DATA: t_et_item TYPE STANDARD TABLE OF et_item INITIAL SIZE 0,
x_et_item TYPE et_item.
TYPES: sc_header TYPE bbp_pds_sc_header_d.
DATA: x_sc_header TYPE sc_header.
TYPES: sc_is_pd TYPE xfeld.
DATA: l_sc_is_pd TYPE sc_is_pd.
TYPES: sc_item TYPE bbp_pds_sc_item_d.
DATA: t_sc_item TYPE STANDARD TABLE OF sc_item INITIAL SIZE 0,
x_sc_item TYPE sc_item.
TYPES: sc_account TYPE bbp_pds_acc.
DATA: t_sc_account TYPE STANDARD TABLE OF sc_account INITIAL SIZE 0,
x_sc_account TYPE sc_account.
TYPES: sc_partner TYPE bbp_pds_partner.
DATA: t_sc_partner TYPE STANDARD TABLE OF sc_partner INITIAL SIZE 0,
x_sc_partner TYPE sc_partner.
TYPES: sc_confirm TYPE bbp_pds_con.
DATA: t_sc_confirm TYPE STANDARD TABLE OF sc_confirm INITIAL SIZE 0,
x_sc_confirm TYPE sc_confirm.
TYPES: sc_longtext TYPE bbp_pds_longtext.
DATA: t_sc_longtext TYPE
STANDARD TABLE OF sc_longtext INITIAL SIZE 0,
x_sc_longtext TYPE sc_longtext.
TYPES: sc_limit TYPE bbp_pds_limit.
DATA: t_sc_limit TYPE STANDARD TABLE OF sc_limit INITIAL SIZE 0,
x_sc_limit TYPE sc_limit.
TYPES: sc_orgdata TYPE bbp_pds_org.
DATA: t_sc_orgdata TYPE
STANDARD TABLE OF sc_orgdata INITIAL SIZE 0,
x_sc_orgdata TYPE sc_orgdata.
TYPES: sc_tax TYPE bbp_pds_tax.
DATA: t_sc_tax TYPE STANDARD TABLE OF sc_tax INITIAL SIZE 0,
x_sc_tax TYPE sc_tax.
TYPES: sc_pridoc TYPE bbp_pds_prc.
DATA: t_sc_pridoc TYPE STANDARD TABLE OF sc_pridoc INITIAL SIZE 0,
x_sc_pridoc TYPE sc_pridoc.
TYPES: sc_messages TYPE bbp_pds_messages.
DATA: t_sc_messages TYPE
STANDARD TABLE OF sc_messages INITIAL SIZE 0,
x_sc_messages TYPE sc_messages.
TYPES: sc_actval TYPE bbp_pds_actval.
DATA: t_sc_actval TYPE STANDARD TABLE OF sc_actval INITIAL SIZE 0,
x_sc_actval TYPE sc_actval.
TYPES: sc_acc_actval TYPE bbp_pds_actval.
DATA: t_sc_acc_actval TYPE STANDARD TABLE OF sc_acc_actval
INITIAL SIZE 0,
x_sc_acc_actval TYPE sc_acc_actval.
TYPES: sc_header_rel TYPE bbp_pds_hrel.
DATA: t_sc_header_rel TYPE STANDARD TABLE OF sc_header_rel
INITIAL SIZE 0,
x_sc_header_rel TYPE sc_header_rel.
TYPES: sc_itmlim_rel TYPE bbp_pds_ilrel.
DATA: t_sc_itmlim_rel TYPE STANDARD TABLE OF sc_itmlim_rel
INITIAL SIZE 0,
x_sc_itmlim_rel TYPE sc_itmlim_rel.
TYPES: it_cuf_item_type TYPE bbps_cuf_item.
DATA: t_it_cuf_item TYPE STANDARD TABLE OF it_cuf_item_type
INITIAL SIZE 0,
x_it_cuf_item TYPE it_cuf_item_type.
- Contract limits -
TYPES: reqconlimits_type TYPE reqheads.
DATA: reqconlimits TYPE STANDARD TABLE OF reqconlimits_type
INITIAL SIZE 10.
DATA: l_reqconlimits TYPE reqconlimits_type.
DATA: lv_abort TYPE xfeld,
lv_is_pd TYPE xfeld,
lv_deliv_date LIKE sy-datum,
lv_tabix LIKE sy-tabix,
lv_line TYPE introw,
lv_msarg TYPE char200,
lv_sc_guid TYPE bbp_pdview_iap-header,
lv_req_guid TYPE bbp_pdview_iap-header.
DATA: x_requis_number TYPE bapiebanc.
IF NOT req_items[] IS INITIAL.
CLEAR l_requis_number.
READ TABLE req_items INTO x_requis_number INDEX 1.
l_requis_number = x_requis_number-preq_no.
requis_number = x_requis_number-preq_no.
ENDIF.
Get PO Guid from Backend Table.
SELECT SINGLE guid
INTO lv_req_guid
FROM bbp_pdbei
WHERE be_object_id = l_requis_number
AND be_object_type = 'BUS2105'.
Get Shopping Cart Guid from PO Guid
SELECT SINGLE header
INTO lv_sc_guid
FROM bbp_pdview_iap
WHERE guid = lv_req_guid.
Get detail from shopping cart
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = lv_sc_guid
i_with_itemdata = 'X'
IMPORTING
e_header = x_sc_header
ev_is_pd = l_sc_is_pd
TABLES
e_item = t_sc_item
e_account = t_sc_account
e_partner = t_sc_partner
e_confirm = t_sc_confirm
e_longtext = t_sc_longtext
e_limit = t_sc_limit
e_orgdata = t_sc_orgdata
e_tax = t_sc_tax
e_pridoc = t_sc_pridoc
e_messages = t_sc_messages
e_actval = t_sc_actval
e_acc_actval = t_sc_acc_actval
e_header_rel = t_sc_header_rel
e_itmlim_rel = t_sc_itmlim_rel.
lv_is_pd = l_sc_is_pd.
message handling
IF NOT t_sc_messages[] IS INITIAL.
CALL FUNCTION 'BBP_BS_ADD_MESSAGES'
IMPORTING
ev_abort = lv_abort
TABLES
it_messages = t_sc_messages.
ENDIF.
if error occured set alert/ exception.
IF NOT lv_abort IS INITIAL.
CALL FUNCTION 'BBP_ALERT_SB_LOCAL'
EXPORTING
msgid = 'BBP_PD'
msgno = 280
msgarg1 = lv_msarg
EXCEPTIONS
invalid_parameters = 1
OTHERS = 2.
RAISE internal_error.
ENDIF.
map shopping cart in new structure into old structure to be able
to continue with the old coding
REFRESH t_sc_messages.
CALL FUNCTION 'BBP_SC_MAP_PD_TO_REQ'
EXPORTING
is_new_header = x_sc_header
IMPORTING
es_reqhead = reqheader
es_req_heads = reqheaders
es_cuf_header = is_cuf_header
TABLES
et_req_reference = reqreferences
et_req_line = reqlines
et_req_line_mat = reqlinemas
et_req_line_srv = reqlinesrs
et_req_text = reqtexts
et_req_acct = reqaccts
et_req_address = reqaddress
et_req_conlimit = reqconlimits
it_new_items = t_sc_item
it_account = t_sc_account
it_partner = t_sc_partner
it_longtext = t_sc_longtext
it_limit = t_sc_limit
it_orgdata = t_sc_orgdata
it_tax = t_sc_tax
it_actval = t_sc_actval
it_itmlim_rel = t_sc_itmlim_rel
et_messages = t_sc_messages.
et_cuf_item = it_cuf_item
et_cuf_acc = it_cuf_acc.
IF NOT t_sc_messages[] IS INITIAL.
message handling
CALL FUNCTION 'BBP_BS_ADD_MESSAGES'
IMPORTING
ev_abort = lv_abort
TABLES
it_messages = t_sc_messages.
ENDIF.
if error occured set alert/ exception.
IF NOT lv_abort IS INITIAL.
CALL FUNCTION 'BBP_ALERT_SB_LOCAL'
EXPORTING
msgid = 'BBP_PU'
msgno = 326
msgarg1 = lv_msarg
EXCEPTIONS
invalid_parameters = 1
OTHERS = 2.
RAISE internal_error.
ENDIF.
End insert 03/26/2003
ReqReferences doesn't list the PO item number. We'll need that to
associate the WBS to a Service Sub Item later. Let's put it in.
SORT reqreferences BY client refnumber reqlline.
LOOP AT reqreferences INTO x_reqreferences.
IF x_reqreferences-refline IS INITIAL.
IF l_requis_number = x_reqreferences-refnumber. "jms 022802
ADD 1 TO line_item.
ELSE.
l_requis_number = x_reqreferences-refnumber. "jms 022802
line_item = 1.
ENDIF.
Accumulate the line item
x_reqreferences-refline = line_item.
MODIFY reqreferences FROM x_reqreferences INDEX sy-tabix.
ENDIF.
ENDLOOP.
SORT reqlines BY client reqno reqlline.
SORT reqreferences BY client reqno reqlline counter.
SORT reqlinemas BY client reqno reqsline reqlline.
SORT reqlinesrs BY client reqno reqsline reqlline.
SORT reqaccts BY client reqno reqlline serial_no. " note 359605
CLEAR: h_preq_item.
CLEAR: h_srv_item, h_srv_outl_created,
h_packno_item, h_packno_srv, h_introw.
First, the Shopping Cart number should be extracted from REQREF table
based on the Req number.
take all items with the specific reference number
LOOP AT reqreferences
INTO l_reqreferences "iok 091701
WHERE refnumber EQ requis_number.
if logical_system is initial.
logical_system = l_reqreferences-logical_system.
endif.
MOVE-CORRESPONDING l_reqreferences TO longkey.
read table reqlines with key longkey binary search.
READ TABLE reqlines INTO l_reqlines "iok 091701
WITH KEY client = longkey-client
reqno = longkey-reqno
reqlline = longkey-reqlline
BINARY SEARCH.
CHECK sy-subrc EQ 0.
h_preq_item = l_reqlines-reqsline+5(5).
clear h_preq_item.
Change line_type based on Material Group
add code here later.
CLEAR: f_change_required,
f_mat_sr_change,
f_limit_change.
SELECT SINGLE category_id
INTO l_mat_group
FROM comm_category
WHERE category_guid = l_reqlines-category.
Check if Services Special Request
IF l_reqlines-catalogid IS INITIAL AND
l_reqlines-product IS INITIAL AND
l_mat_group(1) = 'S' AND
l_reqlines-line_type = '1'. "Service Special Request
Set flags for future processing
l_reqlines-line_type = '3'.
f_change_required = 'X'.
f_limit_change = 'X'.
Check if Material Special Request
ELSEIF l_reqlines-catalogid IS INITIAL AND
l_reqlines-product IS INITIAL AND
l_mat_group(1) <> 'S' AND
l_reqlines-line_type = '1'. "Material Special Request
Set flags for future processing
f_change_required = 'X'.
f_mat_sr_change = 'X'.
ENDIF.
CHECK f_change_required = 'X'.
For Material Special Requests only need to select and store UNSPSC
code -- iok 092401
IF f_mat_sr_change = 'X'.
Get UNSPSC code (first hit) based on Material Group and store
in text id B05. iok 092101
READ TABLE req_items INTO l_req_items
WITH KEY preq_item = h_preq_item
mat_grp = l_mat_group.
READ TABLE req_item_text INTO l_req_item_text
WITH KEY preq_no = requis_number
preq_item = l_req_items-preq_item
text_id = 'B05'.
IF sy-subrc <> 0.
CLEAR l_req_item_text.
Find a UNSPSC Code from a Material Group .. even it's arbitrary
SELECT unspsc_code UP TO 1 ROWS
FROM zxl8_category_id
INTO l_req_item_text-text_line
WHERE category_id = l_mat_group.
ENDSELECT.
If nothing found then fill in a dummy UNSPSC. The first
letter of the Material will designate whether it's a Material
or Service.
IF sy-subrc NE 0.
Move the Material Group value into a holding variable
CONCATENATE l_mat_group(1) 'XXXXXXXX'
INTO l_req_item_text-text_line.
ENDIF.
l_req_item_text-preq_no = requis_number.
l_req_item_text-preq_item = l_req_items-preq_item.
l_req_item_text-text_id = 'B05'.
INSERT l_req_item_text INTO TABLE req_item_text.
ENDIF.
CONTINUE. "to next item.
ENDIF.
IF f_first_change = 'X' AND f_limit_change = 'X'.
Save old P.Req. data and clear tables
old_req_items[] = req_items[].
old_req_item_account[] = req_item_account[].
old_req_item_text[] = req_item_text[].
old_req_limits[] = req_limits[].
old_req_contract_limits[] = req_contract_limits[].
old_req_services[] = req_services[].
old_req_serv_account[] = req_serv_account[].
old_req_serv_text[] = req_serv_text[].
old_req_addrdelivery[] = req_addrdelivery[].
REFRESH: req_items,
req_item_account,
req_item_text,
req_limits,
req_contract_limits,
req_services,
req_serv_account,
req_serv_text.
req_addrdelivery.
CLEAR f_first_change.
ENDIF.
Limit
IF l_reqlines-line_type EQ '3'.
and not reqheaders-limit is initial.
DATA: l_reqreferences_temp TYPE reqreferences_type.
+JMS 2/26/2002
CLEAR l_reqreferences_temp.
READ TABLE reqreferences INTO l_reqreferences_temp
WITH KEY client = longkey-client
reqno = longkey-reqno
reqlline = longkey-reqlline
BINARY SEARCH.
IF sy-subrc = 0.
h_preq_item = l_reqreferences_temp-refline.
ENDIF.
CLEAR l_req_items.
READ TABLE old_req_items INTO l_req_items
WITH KEY preq_item = h_preq_item.
MOVE-CORRESPONDING l_req_items TO reqheaders.
reqheaders-begdate = l_req_items-deliv_date.
reqheaders-limit = l_req_items-c_amt_bapi.
reqheaders-exp_value = l_req_items-c_amt_bapi.
reqheaders-gr_ind = 'X'.
reqheaders-reqno = l_req_items-preq_no. "jms 022602
CLEAR l_req_items.
INSERT FORM **** CREATE_SERVICE_ITEM
h_packno_item = h_packno_item + 1.
h_packno_srv = h_packno_srv + 10000.
h_introw = h_introw + 1.
CLEAR l_req_items. " Note 364396
MOVE-CORRESPONDING reqheaders TO l_req_items.
l_req_items-preq_no = reqheaders-reqno. "jms 022602
l_REQ_ITEMS-PREQ_NO = REQUIS_NUMBER. "jms 022602
l_REQ_ITEMS-PREQ_ITEM = H_PREQ_ITEM + 1. "iok 091801
l_req_items-preq_item = h_preq_item. "iok 091801
l_current_item = h_preq_item. "iok 092101
h_srv_item = l_req_items-preq_item.
h_preq_item = h_preq_item + 1.
IF NOT reqheaders-limit IS INITIAL OR
NOT reqheaders-exp_value IS INITIAL.
IF reqheaders-gr_ind IS INITIAL.
l_req_items-item_cat = '1'.
ELSE.
l_req_items-item_cat = '9'.
ENDIF.
l_req_items-deliv_date = reqheaders-begdate.
ELSE.
l_req_items-item_cat = '9'.
ENDIF.
IF l_req_items-del_datcat IS INITIAL.
l_req_items-del_datcat = '1'.
ENDIF.
l_req_items-quantity = 1.
l_req_items-pckg_no = h_packno_item.
IF l_req_items-preq_name EQ space.
l_req_items-preq_name = sy-uname.
ENDIF.
APPEND l_req_items TO req_items.
END OF FORM INSERTION ********
l_req_limits-pckg_no = h_packno_item.
l_req_limits-limit = reqheaders-limit.
l_req_limits-exp_value = reqheaders-exp_value.
l_req_limits-no_limit = reqheaders-no_limit.
l_req_limits-no_frlimit = 'X'.
APPEND l_req_limits TO req_limits.
*.... Account assignment
clear requisition_srv_accass_values.
CLEAR l_req_serv_account.
l_req_serv_account-pckg_no = h_packno_item.
MOVE-CORRESPONDING l_reqlines TO longkey.
read table reqaccts with key longkey binary search. "iok 091801
READ TABLE reqaccts INTO l_reqaccts "iok 091801
WITH KEY client = longkey-client
reqno = longkey-reqno
reqlline = longkey-reqlline
BINARY SEARCH.
IF sy-subrc = 0.
LOOP AT reqaccts
INTO l_reqaccts
WHERE reqno = l_reqreferences-reqno
AND reqlline = l_reqreferences-reqlline.
INSERT FULL FORM *********** FILL_REQ_ACCT_SRV
DATA: acctcomp1 TYPE bapiebkn,
acctcomp2 TYPE bapiebkn,
high_serial TYPE dzekkn. "LIKE BAPIEKKN-SERIAL_NO.
CLEAR l_req_serv_account-serial_no.
CLEAR acctcomp1.
MOVE-CORRESPONDING l_reqaccts TO acctcomp1.
CLEAR: acctcomp1-preq_no,
acctcomp1-preq_item,
acctcomp1-serial_no,
acctcomp1-created_on,
acctcomp1-created_by,
acctcomp1-preq_qty,
acctcomp1-distr_perc,
acctcomp1-change_id,
acctcomp1-currency.
LOOP AT req_item_account INTO l_req_item_account.
CLEAR acctcomp2.
MOVE-CORRESPONDING l_req_item_account TO ACCTCOMP2. "is blank
CLEAR: acctcomp2-preq_no,
acctcomp2-preq_item,
acctcomp2-serial_no,
acctcomp2-created_on,
acctcomp2-created_by,
acctcomp2-preq_qty,
acctcomp2-distr_perc,
acctcomp2-change_id,
acctcomp2-currency.
IF acctcomp1 EQ acctcomp2 AND h_srv_outl_created IS INITIAL.
l_req_serv_account-serial_no = l_req_item_account-serial_no.
EXIT.
ENDIF.
high_serial = l_req_item_account-serial_no.
ENDLOOP.
h_srv_outl_created = ' '.
IF l_req_serv_account-serial_no IS INITIAL.
MOVE-CORRESPONDING l_reqaccts TO l_req_item_account.
l_REQ_item_ACCOUNT-PREQ_NO = REQUIS_NUMBER. "jms 022702
l_req_item_account-preq_no = l_req_items-preq_no."jms 022702
l_req_item_account-preq_item = h_srv_item.
REQUISITION_ACCOUNT_ASSIGNMENT-WBS_ELEM_E = REQACCT-BBP_PROJECT.
l_req_item_account-serial_no = high_serial + 1.
l_req_serv_account-serial_no = l_req_item_account-serial_no.
APPEND l_req_item_account TO req_item_account.
ENDIF.
END OF FORM INSERTION ***********
h_serial_no = h_serial_no + 1.
l_req_serv_account-serno_line = h_serial_no.
l_req_serv_account-percentage = l_reqaccts-distr_perc.
APPEND l_req_serv_account TO req_serv_account.
ENDLOOP.
INSERT FULL FORM **************** CONVERT_ACCOUNT_***_CAT
data: account_tab LIKE bbp_pds_acc OCCURS 0 WITH HEADER LINE.
DATA: account_tab TYPE STANDARD TABLE OF bbp_pds_acc.
DATA: l_account_tab TYPE bbp_pds_acc.
DATA: h_knttp TYPE knttp.
move the accounting data to that item into the interface table
LOOP AT reqaccts
INTO l_reqaccts
WHERE reqno EQ l_reqreferences-reqno
AND reqlline EQ l_reqreferences-reqlline.
MOVE-CORRESPONDING l_reqaccts TO l_account_tab.
APPEND l_account_tab TO account_tab.
ENDLOOP.
call the convert API
CALL FUNCTION 'BBP_ACCCAT_MAP_EXP'
EXPORTING
i_logical_system = logical_system
IMPORTING
e_r3_acc_cat = h_knttp
TABLES
i_pd_account = account_tab.
IF h_knttp IS INITIAL.
h_knttp = 'X'.
ENDIF.
+JMS 2/14/2002 Issue #1590
CLEAR account_tab.
REFRESH account_tab.
account assignment category - set in the correct item
LOOP AT req_items
INTO l_req_items
WHERE preq_item EQ l_req_item_account-preq_item.
l_req_items-acctasscat = h_knttp.
MODIFY req_items FROM l_req_items INDEX sy-tabix.
ENDLOOP.
END OF FORM INSERTION ************
ELSE.
INSERT FULL FORM ************* Form CONVERT_ACCOUNT_***_CAT_U
LOOP AT req_items
INTO l_req_items
WHERE preq_item EQ l_current_item.
l_req_items-acctasscat = 'U'.
MODIFY req_items FROM l_req_items INDEX sy-tabix.
ENDLOOP.
END OF FORM INSERTION ************
ENDIF.
Get UNSPSC code (first hit) based on Material Group and store
in text id B05. iok 092101
READ TABLE req_items INTO l_req_items
WITH KEY preq_item = l_current_item
mat_grp = l_mat_group.
READ TABLE req_item_text INTO l_req_item_text
WITH KEY preq_no = requis_number
preq_item = l_req_items-preq_item
text_id = 'B05'.
IF sy-subrc <> 0.
CLEAR l_req_item_text.
Get UNSPSC Code from Material Group .. even if arbitrary
SELECT unspsc_code UP TO 1 ROWS
FROM zxl8_category_id
INTO l_req_item_text-text_line
WHERE category_id = l_mat_group.
ENDSELECT.
If nothing found then fill in a dummy UNSPSC. The first
letter of the Material will designate whether it's a Material
or Service.
IF sy-subrc NE 0.
Move the Material Group value into a holding variable
CONCATENATE l_mat_group(1) 'XXXXXXX'
INTO l_req_item_text-text_line.
ENDIF.
l_req_item_text-preq_no = requis_number.
l_req_item_text-preq_item = l_req_items-preq_item.
l_req_item_text-text_id = 'B05'.
INSERT l_req_item_text INTO TABLE req_item_text.
ENDIF.
Don't send Internal Note to Backend
delete req_item_text where text_id = 'B02'.
Service -- NOT NEEDED -- IOK 07/13/01
elseif not reqlines-reqsline is initial
and reqlines-line_type eq '2'.
move-corresponding reqlines to shortkey.
read table reqlinesrs with key shortkey binary search.
if sy-subrc = 0.
h_serv = reqlinesrs.
append h_serv.
endif.
material item -- NOT NEEDED -- IOK 07/13/01
ENDIF.
ENDLOOP.
Services -- NOT NEED -- IOK 07/13/01
IF f_limit_change = 'X'.
Check multiple account assignment
LOOP AT req_items INTO l_req_items.
h_index = sy-tabix.
CLEAR next.
LOOP AT req_item_account
INTO l_req_item_account
WHERE preq_item EQ l_req_items-preq_item.
next = next + 1.
ENDLOOP.
IF next > 1.
l_req_items-distrib = '2'. "prozentuale Verteilung
l_req_items-part_inv = '1'.
l_req_items-gr_non_val = 'X'.
MODIFY req_items FROM l_req_items INDEX h_index. "217191
modify requisition_items. "217191
ENDIF.
ENDLOOP.
ENDIF.
Remap delivery address for backend processing
LOOP AT req_addrdelivery INTO l_req_addrdelivery.
MOVE: l_req_addrdelivery-name_2 TO l_req_addrdelivery-name,
l_req_addrdelivery-c_o_name TO l_req_addrdelivery-name_2.
CLEAR: l_req_addrdelivery-c_o_name.
MODIFY req_addrdelivery FROM l_req_addrdelivery INDEX sy-tabix.
ENDLOOP.
CHM 07/16/2003 Changed created by to always be actual creator even
for on behalf of situations
LOOP AT req_items
INTO l_req_items.
l_req_items-created_by = x_sc_header-created_by.
MODIFY req_items FROM l_req_items INDEX sy-tabix.
ENDLOOP.
CMH - end change
MA 12/10/04 - Pass MP2 number from Manu Prod# to Req Item Text
LOOP AT req_items INTO l_req_items.
READ TABLE t_sc_item into x_sc_item
WITH KEY number_int = l_req_items-preq_item.
l_req_item_text-preq_no = requis_number.
l_req_item_text-preq_item = l_req_items-preq_item.
l_req_item_text-text_id = 'B06'.
l_req_item_text-text_line = x_sc_item-manu_prod.
INSERT l_req_item_text INTO TABLE req_item_text.
ENDLOOP.
ENDMETHOD.Any help guys?
Thanks
Manyam -
HELP NEEDED. Plugin container stopped working / Script does not respond
Hi!
I am aware that there are numerous articles about this problem, but unfortunately none of them solves my problem.
Very frequently, at least once a day (usually from 3 to even 7 times a day) my Mozilla Firefox freezes and I am forced to restart it. It typically occurs when I try to open a page with some interactive content in it (youtube, some fancy flash pages, even gmail document preview). When I try to close it, Windows pops up a message saying that "Firefox stopped working" and terminates the application itself, and then another window pops up, saying "Plugin Container for Firefox stopped working". It's usually either that, but sometimes Mozilla also shuts itself without any warning and the same message appears.
As for "script does not respond", it does happen as well, although way more seldom. Usually it happens on the pages with lots of images. The whole browser then freezes for couple of seconds, then it pops up a window saying that the script does not respond and asks whether I want to force it to continue or not. It doesn't make any difference which option I choose because usually the browser crashes anyway.
I am using version 34 and I made sure all my plugins and addons are up to date. I also disabled hardware acceleration and tried to reinstall whole flash thing. I wonder whether it's the fault of one of my addons, but I admit I am not too eager to try and disable them all and then test it one by one because it would take up way too much time.
Apart from that, none of the previous solutions seem to help, and the problem really gets on my nerves because numerous times I lost a huge block of text I was writing. Now I learned to copy everything I write couple of times :/
Maybe the crash reports will help. I'll link them from the newest to the oldest (for some weird reason they are 3 crash reports from today, yesterday and 3 days ago - weird, because the browser has shut itself today at least twice, not to mention previous days):
https://crash-stats.mozilla.com/report/index/ba7f5087-3d7d-4b2c-b9b1-04e6d2150105
https://crash-stats.mozilla.com/report/index/72eaf792-5f06-445b-806c-cd7922150104
https://crash-stats.mozilla.com/report/index/c3f81ff8-df10-45a6-8400-1c5912150103
I'll be glad for any help because, honestly, I can't stand it anymore. No reinstalling of Firefox or restoring settings to default have helped me yet.Hmm, that's pretty bad. Often if Windows is stepping in with the crash report, then the issue is with a driver incompatibility, most commonly a display driver.
Here are a couple things to try:
(1) Disable Firefox from using hardware acceleration
This is the traditional workaround. You can use:
"3-bar" menu button (or Tools menu) > Options > Advanced
On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
That takes effect the next time you exit and start Firefox up again, which the way you describe it, might be quite soon.
(2) Disable the Flash player plugin from using hardware acceleration
This is a separate setting. See this support article from Adobe: http://helpx.adobe.com/flash-player/kb/video-playback-issues.html#main_Solve_video_playback_issues
(3) Disable the Flash plugin's protected mode feature
Protected mode has security benefits, but is not compatible with all systems for some reason. It can stall scripts on some systems, for example. You can disable the feature by creating or editing a settings file. The following pages/posts provide different approaches:
* Adobe support article under the heading "Last Resort": [http://forums.adobe.com/message/4468493#TemporaryWorkaround Adobe Forums: How do I troubleshoot Flash Player's protected mode for Firefox?]
* Manual steps: https://support.mozilla.org/questions/968190?page=5#answer-509209
* Batch file to automate the manual steps: https://support.mozilla.org/questions/982093#answer-518078 (alternate version of Carm's batch file with a few changes by me: [https://onedrive.live.com/?cid=f7d304d92388737d&id=F7D304D92388737D!336&ithint=file,.bat&authkey=!AP2FXW2Y_3BXZyo])
Any improvement? -
Help needed. Ipod won't work and won't format.
Hi,
everytime i connect my ipod, it says i need to format. (It shows the folder with exclamation point picture). I used the updater to format, but it doesn't work. "Can't connect the Ipod".
What should I do?
Thnx,
JoyceSee if this helps;
http://docs.info.apple.com/article.html?artnum=61003
Cheers!
-Bryan -
Help needed getting contacts page to work
Hi there,
I’m new to flash programming, so please bear with me.
I bought a flash template to customise to use for our wedding
website. I’ve got pretty much most of it done, all except the
contacts page, which I can’t get to work.
I think I’ve narrowed the problem down to the feed into
send_mail.php script, but any suggestions would be greatly
appreciated (before my future wife kills me for wasting so much
time on this when we could have got a simple html website –
but where would be the fun in that?!)
I've attached the Action script behind the contacts page
(please excuse the Spanish – for some reason the scripts are
littered with it – for those who need to know, boton =
button, listo = ready, nombre = name, cuadro = picture).
From what I can gather, the first bit deals with what happens
when you click on the buttons (name and email), the second bit is
for error checking what’s entered, such as whether the email
address has a @ or .com. The last bit is to feed the results into a
php file, which should forward the contents of the contacts page to
me.
Here’s my send_mail.php file
<?php
$nombre=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['company'];
$comentarios=$_POST['msg'];
$to="[email protected]";
$subject="From flash form";
$headers="From: \"$name\" <$email>";
$message = "Company: $company\n\n";
$message .= $msg;
mail($to,$subject,$message,$headers);
?>
And I've put this php file in the same directory of my
website as all the other swf and fla files – is that correct?
Should this work? Or have I made a mistake anywhere?
Many thanks
DMOkay is the php script you have included here, THE actual
script that is on your website? (unchanged in it's contents)
Because where it says:
$to="[email protected]";
You have to change that to your email, or the email you want
the form contents to send to.
-Yes you will put the .php file in the same directory as the
.swf file-
Also you need to check that the variable and instance names
in the flash file match the names in the .php file.
Example:
"mail.nombre = nombre.text;
mail.email = email.text;
mail.phone = phone.text;
mail.comentarios = comentarios.text;
mail.Submit = true;"
-This is what you have provided for the form, which does not
match the .php file provided.
If the instance name of the email section is "email" the php
file will read like this:
email=$_POST['email'];
The name inside the apostrophes is the instance name of that
box.
Looking at the scripts you have provided the instances and
variables in the form do not match the ones in the .php file.
If I am wrong, you can send me the original file if you wish
and I can most likely find the problem for you and fix it.
Or if you need help assessing this, I can do it for you! =P
my email is [email protected]
Hope I helped.
Cheers! -
Help needed: getting jar files to work.
Right, to start off, i have been doing php and mysql for a long time and i thought it's time to start using java.
So now im trying to create an application. I use eclipse. All works well if i run the program from eclipse. But i want to create and executable or a jar file first. I used JSmooth but with that i get an error "Could not find the main class".
While exporting the project as a jar i specified the main class in manifest specification.
So these are my classes:
the Main.class
public class Main{
public static void main(String[] args) {
PageFrame page = new PageFrame();
page.show();
}and the PageFrame.class
import java.net.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
class PageFrame extends JFrame implements ActionListener,MouseListener{
String[] skillnames = {"attack","hitpoints","mining","strength","agility","smithing","defence","herblore","fishing","ranged","thieving","cooking",
"prayer","crafting","firemaking","magic","fletching","woodcutting","runecraft","slayer","farming","construction","hunter","summoning"};
JTextField username = new JTextField("",12);
JTextArea box = new JTextArea(10,12);
JButton search = new JButton("Search");
int[] differences = {0,83,174,276,388,512,650,801,969,1154,1358,1584,1833,2107,2411,2746,3115,3523,3973,4470,5018,5624,6291,7028,7824,
8740,9730,10824,12031,13363,14833,16456,18247,20224,22406,24815,27473,30408,33648,37224,41171,45529,50339,55649,61512,67983,
75127,83014,91721,101333,111945,122660,136594,150872,166636,184040,203254,224466,247886,273742,302288,333804,368599,407015,
449428,496254,547953,605032,668051,737627,814445,899257,992895,1096278,1210421,1336443,1475581,1629200,1798808,1986068,2192818,
2421087,2673114,2951373,3258594,3597792,3972294,4385776,4842295,5346332,5902831,6517253,7195629,7944614,8771558,9684577,10692629,
11805606,13034431,14567891};
URL page;
static String name;
JLabel[] skills = new JLabel[24];
JLabel skillicons = new JLabel();
public PageFrame(){
super("Stats Lookup");
setSize(800,600);
setResizable(false);
try{
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(this);
}catch (Exception e){
System.err.println("Yo" + e);
//teen labelid;
for (int i = 0; i < skills.length;i++){
ImageIcon icon = new ImageIcon(PageFrame.class.getResource("images/skillimages/" + skillnames[i] + ".gif"));
skills[i] = new JLabel("00",icon,JLabel.CENTER);
JPanel pane = new JPanel();
GridBagLayout maingrid = new GridBagLayout();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridBagConstraints constraints = new GridBagConstraints();
JPanel skillPane = new JPanel();
GridBagLayout levelslyo = new GridBagLayout();
GridBagConstraints sConstraints = new GridBagConstraints();
sConstraints.ipadx = 15;
sConstraints.ipady = 10;
skillPane.setLayout(levelslyo);
int k = 0;
int m = 1;
buildconstraints(sConstraints,12,4,1,1,2,2);
skillPane.add(skillicons);
for (int i = 0; i < skills.length;i++){
buildconstraints(sConstraints,m,k,1,1,2,2);
levelslyo.setConstraints(skills, sConstraints);
//skills[i].setText(" 0 ");
skillPane.add(skills[i]);
skills[i].addMouseListener(this);
m+=2;
if (m == 7){
m = 1;
k +=1;
/*m = 0;
k = 0;
for (int i = 0; i < skills.length;i++){
System.out.println("Paremale: " + m + " Alla: " + k);
buildconstraints(sConstraints,m,k,1,1,2,2);
levelslyo.setConstraints(skillicons, sConstraints);
skillicons = new JLabel(icon);
skillPane.add(skillicons);
m+=2;
if (m == 6){
m = 0;
k +=1;
buildconstraints(constraints,0,0,1,1,100,100);
maingrid.setConstraints(username, constraints);
buildconstraints(constraints,1,0,1,1,100,100);
maingrid.setConstraints(search, constraints);
buildconstraints(constraints,0,1,1,1,100,100);
maingrid.setConstraints(skillPane, constraints);
pane.setLayout(maingrid);
constraints.fill = GridBagConstraints.BOTH;
search.addActionListener(this);
box.setEditable(false);
buildconstraints(constraints,1,1,2,1,120,100);
maingrid.setConstraints(box, constraints);
pane.add(username);
pane.add(search);
pane.add(box);
pane.add(skillPane);
setContentPane(pane);
//getContentPane().add(scroll);
pack();
setVisible(true);
WindowListener l = new WindowAdapter(){
public void windowClosing(WindowEvent evt){
System.exit(0);
addWindowListener(l);
void buildconstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx,int wy){
gbc.gridx = gx;
gbc.gridy = gy;
gbc.gridwidth = gw;
gbc.gridheight = gh;
gbc.weightx = wx;
gbc.weighty = wy;
/*Vector ranks = new Vector();
Vector levels = new Vector();
Vector exp = new Vector();*/
class Stats{
int[] levels = new int[34];
int[] experience = new int[34];
int[] ranks = new int[34];
Stats stats = new Stats();
public void getStats(URL url){
URLConnection conn = null;
InputStreamReader in;
BufferedReader data;
String line;
StringBuffer buf = new StringBuffer();
try{
conn = this.page.openConnection();
conn.connect();
//box.setText("Connection opened");
in = new InputStreamReader(conn.getInputStream());
data = new BufferedReader(in);
//box.setText("Reading data...");
int ts=0;
while ((line = data.readLine()) != null){
buf.append(line + "\n");
StringTokenizer tokenize;
tokenize = new StringTokenizer(line.toString(),",");
int[][] paarid = {{1,0},{2,3},{3,6},{4,1},{5,9},{6,12},{7,15},{8,11},{9,17},{10,16},{11,8},{12,14},{13,13},
{14,5},{15,2},{16,7},{17,4},{17,10},{19,19},{20,20},{21,18},{22,22},{23,21},{24,23}};
if (ts < 25 && ts > 0){
int slot = paarid[ts-1][1];
stats.ranks[slot] = Integer.parseInt(tokenize.nextToken());
int yo = Integer.parseInt(tokenize.nextToken());
stats.levels[slot] =yo;
stats.experience[slot] = Integer.parseInt(tokenize.nextToken());
ts++;
for (int i = 0; i < skills.length;i++){
String text = ""+stats.levels[i];//testings[i];//
skills[i].setText(text);
}catch(IOException e){
box.setText("Insert a username \nfirst!");
public String getNextXp(int level, int currxp){
String nextXp;
if (level > 98){
nextXp = "N/A";
}else{
nextXp = ""+(differences[level] - currxp);
return nextXp;
public void actionPerformed(ActionEvent evt){
String newuser = username.getText().toString();
name = newuser;
String address = "http://hiscore.runescape.com/index_lite.ws?player="+name;
try{
page = new URL(address);
getStats(page);
}catch(MalformedURLException e){
box.setText("Insert a username");
repaint();
public void mouseEntered(MouseEvent e) {
//if (experience[].isEmpty()){
Object s = e.getSource();
for (int i = 0; i < skills.length;i++){
if (s == skills[i]){
box.setText("Rank: " + stats.ranks[i] + "\nExperience: " + stats.experience[i] + "\nExp until next: " + getNextXp(stats.levels[i],stats.experience[i]));
public void mouseExited(MouseEvent e) {
box.setText("");
public void mouseClicked(MouseEvent e) {
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
This is just a little project i thought i'd make for learning.
But can anyone help me make a working jar or an exe file?
The Jar i created does nothing, no error or anything.
Thanks for Help.How should i run the jar file then? I am double clicking it yes.
EDIT: i ran the program through command line and i got an error:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at PageFrame.<init>(PageFrame.java:41)
at Main.main(Main.java:4)OK - so it looks like you've found a command line!
You read these stack traces from the top down. Often the most interesting line is the first line that refers to your code. In this case line 41 of PageFrame.java which, I guess is this:
ImageIcon icon = new ImageIcon(PageFrame.class.getResource(
"images/skillimages/" + skillnames[i] + ".gif"));The ImageIcon constructor is grumbling about being told to construct an icon from a null resource. getResource() will return null if it cannot find the resource that you specify.
The first thing to do is check that the .gif image is where it should be. You have specified it as "images/skillimages/etc" so use the command line to view the contents of the .jar file (or maybe Eclipse will let you do this). Next to PageFrame.class there should be a folder "images" and within it a folder "skillimages" and within that the image file. If not then your jar export has been seen up wrongly and is not including the required resource files.
(The "View" command is explained here: [http://java.sun.com/docs/books/tutorial/deployment/jar/view.html].)
Next check the case of the file names. On Windows getResource() will not worry about the cAsE of filenames so the resources will be located fine when running the program unjarred (including within Eclipse). But it does worry about the case of jar entry names. Bottom line: keep the file names all lower case because you use them that way in the code.
Finally, in case it is a particular image resource that's causing the problem you could add some code to print out its name just before you try and create the icon.
for (int i = 0; i < skills.length;i++){
System.out.println(
"About to make icon from " + "images/skillimages/" + skillnames[i] + ".gif");
ImageIcon icon = new ImageIcon(PageFrame.class.getResource(
"images/skillimages/" + skillnames[i] + ".gif"));
skills[i] = new JLabel("00",icon,JLabel.CENTER);
} -
Help needed to find out BADI's for Transaction "PECM_CHANGE_STATUS"
Hi folks,
I was told to use BADI "HRECM00_ACTIVATION" and code in the Method "CALC_SAL_ADJUSTMENT" within it. After coding and executing my Transaction "PECM_CHANGE_STATUS" it does'nt stop at the method (inspite of keeping a breakpoint).
So, after suggestions from some of you folks i tried the below 2 methods to find out the relavant BADI's
1) First way, putting a breakpoint at "CALL METHOD cl_exithandler=>get_class_name_by_interface" via SE24 and found only one BADI in exit_name which is "HRPAD_SUBTY_CHECK".
2) Other way i checked the Package of suggested BADI "HRECM00_ACTIVATION" , which i found as "PAOC_ECM_ADM_BL". ANd when i go to SE80, for this package when i check the Enhancements section->Classic BADIs. i found about 15 BADI's ..Is this the right way to check for a BADI ? If not, how to know the relavant BADI's for my transaction "PECM_CHANGE_STATUS"
Awaiting for response. Thanks!Hi,
1. The BADI "HRECM00_ACTIVATION" does exist in this transaction, did you activate the implementation after writing the code? The method is called in the FM HR_ECM_CALC_SAL_ADJUSTMENT. You can try executing with breakpoint at the FM HR_ECM_CALC_SAL_ADJUSTMENT.
2. You can try using the program in the code gallery to find user exit/Badi. Link: [Badi/exit finder|https://wiki.sdn.sap.com/wiki/display/Snippets/ToFindoutUserexitsandBAdI%27s%28New+format%29].
3. In case you are working on ECC 6.0 the first point ( "CALL METHOD cl_exithandler=>get_class_name_by_interface" ) mentioned by you might now return all the BADIS, as SAP has introduced a new method by which BADIS are invoked. You can try searching for Kernel Badi in SAP Help.
Regards,
Sai -
Help needed trying make thumbnails from large Image Files
I posted this to the Flex message bored, too. I didn't notice
the Actionscript 3.0 until after. Sorry. Anyway, I have some
ActionScript 3.0 code, created with Flex that will load a large
JPEG image (say 3000x2000 pixels) that I'm trying to create a 100
pixel thumbnail. I have the code working where I generate the
thumbnail, but it's not maintaining the aspect ratio of the
original image. It's making it square, filling in white for the
part that doesn't fit.
I've tried just setting the height or width of the new
image, but that doesnt render well, either.
To see what I'm talking about, I made a screen shot, showing
the before image, and the rendered as thumbnail image:
Image of demo
app at Flickr.
Now, there's a few things important to note. I'm saving the
thumbnail off as a JPEG. As you can see in my sample application,
the original renders fine with the proper aspect ratio, it's when
I'm copying the bytes off the bitmapdata object, where I need to
specify a width and height, that the trouble starts. I've also
tried using .contentHeight and .contentWidth and some division to
manually specify a new bitmapdatasize, but these values seem to
always have NaN.
private function makeThumbnail():void{
// create a thumbnail of 100x100 pixels of a large file
// What I want to create is a a thumbnail with the longest
size of the aspect
// ratio to be 100 pixels.
var img:Image = new Image();
//Add this event listener because we cant copy the
BitmapData from an
/// image until it is loaded.
img.addEventListener(FlexEvent.UPDATE_COMPLETE,
imageLoaded);
img.width=100;
img.height=100;
img.scaleContent=true;
img.visible = true;
// This is the image we want to make a thumbnail of.
img.load("file:///C:/T5.jpg");
img.id = "testImage";
this.addChildAt(img, 0);
private function imageLoaded(event:Event):void
// Grab the bitmap image from the Input Image and
var bmd:BitmapData =
getBitmapDataFromUIComponent(UIComponent(event.target));
//Render the new thumbnail in the UI to see what it looks
theImage.source = new Bitmap(bmd); //new Bitmap(bmd);
public static function
getBitmapDataFromUIComponent(component:UIComponent):BitmapData
var bmd:BitmapData = new
BitmapData(component.width,component.height );
bmd.draw(component);
return bmd;
}Hi Tod,
Take a look at this post:
I'll have to say the smoothing of the thumb is not perfect, but maybe in combination with your code.. you get good results.
Post a solution if you acheive better smooth thumb results.
Link to forum post:http://forums.adobe.com/message/260127#260127
Greets, Jacob -
Urgent help needed! YouTube widget now working
Hi,
I have a project with several YouTube videos in, but when I test it they do not show up.
I have opened a new project and you widget works fine, I have copied working YouTube widgets from other projects in to this one and they dont work.
So I am concluding that the project have some sort of issue. Does anyone know what it could be and how I could fix it? I can't just make a new one as this one have lots of advanced actions etc.
PLEASE HELP! thanksNothing shows at all, not even an error message.
Any other project I open that has YouTube videos in works fine! It is just specifically this project. There must be some kind of bug! I am using Chrome and like I said, it usually always works. -
Help needed too make a flash presentation with sound
Hi Folks,
I've recently kicked off a 'not - for - profit' project to raise awareness of the effects of Post Traumatic Stress Disorder in Veterans. I've been trying to make a flash video with an MP3 sound clip and slide images but I'm having makor problems with getting the file made.
Is there anyone around that would be able to help with this project by making the presentation video for me? I wouldn't be able to properly pay the person as funds are very restricted but I'd be happy for a credit to go in at the end of the video kisting you as 'producer', or something similar.
This video has to be made to coincide with Veterans week in the UK - 19-27 June 2010, so needs to be made and then uploaded ASAP.
I can offer a nominal payment of £10, as a thank you once the file's completed and running. I can't cope with making the file because of my disability, so I hope someone can help me.
Regards
RAF Veteranonclipevent(load)
total=_root.getbytestotal();
onclipevent(enterframe)
loaded=_root.getbytesloaded();
current=int(loaded/total*100);
p=""+current+"%";
if(loaded==total)
gotoandplay("Scene 2",1);
sorry for getting the code and coment mixed up. -
Help needed getting Zen Micro to work on new
Hi there, I am having a tough time getting my new PC to interact with my Zen Micro
I have installed all the required software, I have done all the updates (or at least I think I have)
I have upgraded my firmware to ver. ..0 and yet i still have the problem.
The organiser seems to see the files in the player, but it cannot transfer them to the PC (or the PC to the Player). I cannot seem to access the player while it is connected either.
So in short, I cannot transfer any of my music to my PC (4Gb worth).
I have sent support requests, and I got an auto response to upgrade all the software versions, and the firmware, which I did. I have gone through the auto-detection process on the Creative site, and it recognises my player, and its newly updated firmware version, and only gives me recommended update options, nothing essential, or critical.
So I'm pretty much stuck. also, how do i know that firmware ver. ..0 is the most updated for my product, as the support mail seems to talk about ver. 2.xx.xx which I'm nervous to start downloading as my player is now over a year old, and i fear that it may not support the newest technologies.
Any help would be greatyl appreciated
Thanks in advance
Sparky
P.S. I am still running my old family PC (Windows 98, with all the creative software original purchase versions running), and when I connect my Zen to this machine it works fine, so I guess that means that the files are not corrupted thankfullyFor the Zen Xtra right?
I went to and chose MP3 Players > Zen (Hard Disk Dri've/MicroDri've) > Zen Xtra, then <EM>Get Files</EM>.
The driver was listed there, but you want to download:
Jukebox Driver version .26.02</LI>
Creative MediaSource Software Update version 2.03.29</LI>
NOMAD JukeBox Type 2 Version .0.03 (English) Web Release</LI>
Creative NOMAD Explorer (Version 3.0.0) (if you want to use Nomad Explorer)</LI>
You then want to:
install the driver</LI>
turn the Xtra on and connect to the PC and let the driver install (should be automatic)</LI>
with the Zen still connected to the PC install MediaSource (it needs a Creative product present to validate the install)</LI>
install the Nomad Jukebox Type 2 version (this is required to get MediaSoruce to work with the player)</LI>
If you want, install Nomad Explorer</LI>
That's all you should need to do. -
Min power supply needed to make Aiport Express work ?
Hi all,
I plan to install an Aiport Express in my car to plug it to my car stereo in order to be able to use my Iphone 3GS music library.
First, I'm tired to use cables !
Furthermore, my car OS (vauxhall) is not anymore a "compatible device" (sic), even with the latest iOS ... but I've got a jack plug :-/
I plan to plug the Aiport Express to my car stereo throught this jack, and broadcast my music throught airplay. The Airport Express would be electrically powered throught the cigar lighter receptacle, or throught a 12v-220v converter (I'd rather prefer the first solution !).
So here is my question : what is the minimal power supply to make work the airport express ? According specs, 12Vdc 1.8A => ~22W ?
Does somebody can confirm 22W would be enought to make the Aiport Express work ?
Thanks a lot !I'm referring Airport EXPRESS ... I forgot that plugs directly ...
The exterme offers other possibilities I don't need ... and is less affordable !
In a car, we only avec DC =>
So I must have a 12 Volt DC to 220 Volt 50Hz AC inverter, delivering at least 200mA(AC).
Something like this or rather this.
I should find it in a good electronic shop, and this kind of material should be rather small.
I'll also check if these devices provide AirPlay without a wi-fi network... or if somebody can here infirm or confirm ?
Thanks
Maybe you are looking for
-
Automatic creation of Purchase order not possible for 103 mvt type
Hi, If i could configure "create p.o automatically", while doing G.R for mvt type 101, why cannot i do the same with 103 mvt type. I checked the checkbox "create p.o automatically" for movement type 103 and tried to do G.R for others using Mvt type 1
-
Hello, my name is Octavia Hall. I was on the computer and I was just trying to sync/backup all of my games so that way, if I accidentally delete on of my game(s), then i would go on the computer and get it back. Now, for some reason, my games are now
-
Report with based on Asset number with repartition by cost center
Hi everybody, I am looking for an asset report (standard one if possible but I did not find it): I want to extract assets per cost center and to have also the original asset number (ANLA-AIB1N). I know I can do that with SQVI or a query (SQ01) but th
-
Help Error (193) After Effects CS5
Hi dear friendsI just installed After effects cs5 and sends me this error and I opened, I was looking for a long time and can not find the solution, but it says the message I give here more info on my pc, and hopefully I can help solve this I do not
-
Need help with update statement with multiple joins
I've got the following select statement that is pulling 29 records: SELECT PPA.PROJECT_ID, PPA.SEGMENT1, peia.expenditure_item_id, peia.expenditure_type, pec.expenditure_comment FROM PA.PA_PROJECTS_ALL PPA, pa.pa_expenditure_items_all peia, pa.pa_exp