Next record on Business Document Forms
Hi all,
I would like to make some settings on Business Document Forms regarding the current showing record. How will I know another record is presented to the user in the form? (E.g. user clicks Next/Previous etc.)
Version: 2004 C, PL 49
Thank you for your suggestion
Best regards,
Daniel Martinec
Hi Daniel,
I'm not aware how the 2004 C version behaves. I'd never tried to use the datasource load (there must be datasources to load in order to let this work).
I'd rather suggest to capture the menuclicks.
<b>Code (C#):
public void HandleMenuEvents(ref MenuEvent pVal, out bool BubblesEvent)
/* Previous or next records */
if(((pVal.MenuUID == "1288") || (pVal.MenuUID == "1289") || (pVal.MenuUID == "1290") || (pVal.MenuUID == "1291")) && !pVal.BeforeAction && (SBO_Application.Forms.ActiveForm.Type == YOUR_FORM_TYPE))
/* ADD YOUR LOGIC HERE */
Hope it helps...
Rowdy
Similar Messages
-
Forms need to get next record value in tabular forms, update # on delete
the isusue
In a tabular form (multirecord)...when i enter + to add the first record , it should add 1 in this item 'order' and if i hit + again then it should enter 2 and so on....
where users would enter different records at once and save it .However if they were to delete a record in the middle ...
say record
1
2
3
4
5
6
and delete 2 and 3 then # 4 should be 2 and # 5 should be 3 and #6 would be 4 . if they are to add a new record then it should assign the next number which would be 5
what i have done is created a non database item in that block and made it a summary field with max
and in the when_new__record_instance trigger...i am doing somthing like
If block.item is NULL
THEN
block.item = block.non_database_item +1
end if
got this from a post here by Francois...
it is adding just 1 everytime i hit + to add a new record...when the item is null in the beginning. However if i save the first record then click + to add new record then it goes inseries like 2..3..4....
Any help would be appreicated . ThanksHI,
Check following thread you may useful
Maximum create call for the VO -
Triger for display next record in oracle forms
hai all,
i want to do
when new form opened i have to add new reord that is empty new form also my new rownum will be displayed.
now i getting first record.
like:
GROUP_ROWNUM: 1
GROUP_ID: 120130
GROUP_NAME aaaaaaaaa
need like:
GROUP_ROWNUM: 7
GROUP_ID:
GROUP_NAME
that can be done by
trigger for display next record in oracle forms?
or through property seting?
thanks in adv,
rcs
--------YES, this block is base on the DB table
through defualt navigational button i can go to next,last,new record
but i want create seperate form for new entry, in that i want to display
old rownum
formula to get rownum automatically (i am not at all typing it is system generated)
even though i created column group_rownum for rownum
(i can't be typing)
LAST_RECORD;
NEXT_RECORD; also not getting the next rownum
i hope now understand me
any posible way?
thank you for your good input
i.e.
SQL> DESC GROUP_MSTR1;
Name Null? Type
GROUP_ID NOT NULL NUMBER(10)
GROUP_NAME NOT NULL VARCHAR2(30)
SQL> select * from GROUP_MSTR1;
GROUP_ID GROUP_NAME
123 AAAAAA
124 BBBBBBBB
125 CCCCCCCCC
126 DDDDDDDD
1 eeeeeeee
2 FFFFFFFFF
3 ggggggg
7 rows selected.
SQL> select rownum, GROUP_ID, GROUP_NAME from GROUP_MSTR1;
ROWNUM GROUP_ID GROUP_NAME
1 123 AAAAAA
2 124 BBBBBBBB
3 125 CCCCCCCCC
4 126 DDDDDDDD
5 1 eeeeeeee
6 2 FFFFFFFFF
7 3 ggggggg
7 rows selected.
------------- -
Create NEXT RECORD button on form
I want to create a NEXT RECORD and PREVIOUS RECORD button on my form. how do I do this so that the buttons are function.
Review the discussions at
http://forums.oracle.com/forums/search.jspa?threadID=&q=get+next+record+process&objID=f137 -
Next record Error in Tomcat deployment of business component
I built a simple business component project for Dept in Scott table. I created a JSP client, mainly following the tutorial in Jdeveloper. Then I ran main.jsp in JDeveloper. This ran fine. I selected the deptview. I was able to scroll through department using next record arrow.
I deployed this application in Tomcat using the deployment profile as webapplication to web sever. When I run this, the main.jsp runs fine. I am also able to go to the deptview. When I try to scroll through the records using the next record arrow the top portion says page can not be found. Insert record works fine.
When I select insert record it seems to go to http://localhost:8080/sssdept1/jspsdept1_html/DeptView_Insert.jsp.
When I try to use the next record arrow it seems to go to http://localhost:8080/jspsdept1_html/DeptView_Top.jsp?DeptView_NAVIGATE=NEXT.
I think that this path is missing the sssdept1 folder. I am not sure how to add this to the usebean. Can anybody help?Can you be more specific?
Which JSP page?
Should I work in Jdeveloper or in the created files?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by jdeveloper:
Try setting the target URL in the NavigatorBar WebBean within the page. The problem here is that the URL information has been lost. Use the setTargetUrl(String sUrl) method in your JSP page.
<HR></BLOCKQUOTE>
null -
How to access next record from database on to form
hi
i have written the following piece of code to retrieve data from database oon to form...
Try
rset = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
query = "Select * from [@TEST] where Code = ('" + oform.Items.Item("6").Specific.value + "') "
rset.DoQuery(query)
Catch ex As Exception
SBO_Application.MessageBox(ErrorToString)
End Try
' oform.Items.Item("6").Specific.value = rset.Fields.Item("Code").Value
oform.Items.Item("7").Specific.value = rset.Fields.Item("Name").Value
oform.Items.Item("8").Specific.value = rset.Fields.Item("U_Sal").Value
but i can see only one record on my form controls.... i have placed on more button called " Next" so that i can access next records from DB when i click on "Next" button...
Public Sub NextRecords()
Try
rset.MoveFirst()
While Not rset.EoF
' oform.Items.Item("6").Specific.value = rset.Fields.Item("Code").Value
oform.Items.Item("7").Specific.value = rset.Fields.Item("Name").Value
oform.Items.Item("8").Specific.value = rset.Fields.Item("U_Sal").Value
rset.MoveNext()
End While
rset.MoveNext()
Catch ex As Exception
SBO_Application.MessageBox(ErrorToString)
SBO_Application.MessageBox("Updated")
End Try
End sub
i'm not able to access next records...
plz provide me the solution and code for this how to handle this scenario....From your question and code sample given, I think the problem is you are seeing only the last record when pressing the next button.
In the Next button press, you are coded such a way that it will populate the last record.
Try removing the do..While.. loop and simply code like
if Not rset.EoF
rset.MoveNext()
oform.Items.Item("6").Specific.value = rset.Fields.Item("Code").Value
oform.Items.Item("7").Specific.value = rset.Fields.Item("Name").Value
oform.Items.Item("8").Specific.value = rset.Fields.Item("U_Sal").Value
end if
So when you click next, you can see the next record. Not the last record.
Anoop -
Hi All,
How I can move to next record (when a condition applies)?
In other words I need the object (or sample code) that perfoms the "Next Record" in navigation menu.
Thanks All,
VangelisHello,
use following statement
SBO_Application.ActivateMenuItem("1288")
where SBO_Application is the UI API application object.
Rahul -
Link invoice with Business Document
Hi all,
I am looking for a way to link my invoices (from R/3 Invoice overview) with the original scanned invoice in TIFF format (business document).
I can see that this is possible using the "Attach Business Document" feature in the change invoice sreen, but I do not want to set this link up manually.
Is there anyway assign a "business document" to an invoice (or the other way around) automatically?
Thanks!....you can use GOS (generic object serivces) to add attachments.
Here is a SD billing example....
Add this program to an output type in transaction NACE
*& Report ZZCREATE_ATTACH *
*& Triggered by billing output-type ZRD4 *
*& Create a "service for object" attachement URL
report zzcreate_attach.
tables: nast.
data: tmp_vbeln like vbrk-vbeln.
data:
*--Object_a
p_botype like obl_s_pbor-typeid,
p_bo_id like obl_s_pbor-instid,
*--Object_b
p_docty like obl_s_pbor-typeid,
p_msgtyp like sofm-doctp,
p_url(300),
p_title(30),
*--Relationship
p_reltyp like mdoblrel-reltype.
*-Include for BO macros -*
include : <cntn01>.
types: begin of ty_message_key,
foltp type so_fol_tp,
folyr type so_fol_yr,
folno type so_fol_no,
doctp type so_doc_tp,
docyr type so_doc_yr,
docno type so_doc_no,
fortp type so_for_tp,
foryr type so_for_yr,
forno type so_for_no,
end of ty_message_key.
data : lv_message_key type ty_message_key.
data : lo_message type swc_object.
data : lt_doc_content type standard table of soli-line with header line.
data : tmp_oblguid16 type oblguid16.
*& Form entry
* text
* -->RETURN_CODE text
* -->US_SCREEN text
form entry using return_code us_screen.
perform create_url.
return_code = 0.
endform. "ENTRY
*& Form create_url
* text
* --> p1 text
* <-- p2 text
form create_url .
if nast-objky+10 ne space.
nast-objky = nast-objky+16(10).
else.
nast-objky = nast-objky.
endif.
tmp_vbeln = nast-objky.
*-Load class. -*
class cl_binary_relation definition load.
class cl_obl_object definition load.
*-Set default values -*
p_botype = 'VBRK'.
p_bo_id = tmp_vbeln.
p_docty = 'MESSAGE'.
p_msgtyp = 'URL'.
p_title = 'Web Hotel'.
p_reltyp = 'URL'.
p_url = 'www.mydoc.tiff'. "Here you must add your URL !!!
*-First derive the Attachment's ( MESSAGE )document type. -*
p_docty = 'MESSAGE'.
case p_reltyp.
* In case of URls
when 'URL'.
p_msgtyp = 'URL'.
* In case of Notes / Private Notes
when 'NOTE' or 'PNOT'.
p_msgtyp = 'RAW'.
when 'ATTA'.
p_msgtyp = 'EXT'.
* Not implemented as yet...exit
exit.
when others.
* ....exit
exit.
endcase.
*-Create an initial instance of BO 'MESSAGE' - to -*
*-call the instance-independent method 'Create'. -*
swc_create_object lo_message 'MESSAGE' lv_message_key.
*-Define container to pass the parameter values -*
*-to the method call in next step. -*
swc_container lt_message_container.
*-Populate container with parameters for method-*
swc_set_element lt_message_container 'DOCUMENTTITLE' p_title.
swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
swc_set_element lt_message_container 'NO_DIALOG' 'X'.
swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
*-'DocumentContent' is a multi-line element ( itab ). -*
*-In case of URLs..it should be concatenated -*
*-with &KEY& in the begining. -*
case p_msgtyp.
when 'URL'.
concatenate '&KEY&' p_url into lt_doc_content.
append lt_doc_content.
*-In case of Notes or Private Notes, get the data -*
*-from files on appl server or from wherever ? -*
*-(remember background). -*
when 'RAW'.
lt_doc_content = 'Hi How r u?' .
append lt_doc_content.
*-In case of File attachments upload file -*
when 'EXT'.
endcase.
swc_set_element lt_message_container 'DocumentContent' lt_doc_content.
swc_call_method lo_message 'CREATE' lt_message_container.
*-Refresh to get the reference of -*
*-create 'MESSAGE' object for attachment -*
swc_refresh_object lo_message.
*-Get Key of new object -*
swc_get_object_key lo_message lv_message_key.
*-Now we have attachment as a business object instance. -*
*-We can now attach it to our main business object instance. -*
*-Create main BO object_a -*
data: lo_is_object_a type sibflporb.
lo_is_object_a-instid = p_bo_id.
lo_is_object_a-typeid = p_botype.
lo_is_object_a-catid = 'BO'.
*-Create attachment BO object_b -*
data: lo_is_object_b type sibflporb.
lo_is_object_b-instid = lv_message_key.
lo_is_object_b-typeid = p_docty.
lo_is_object_b-catid = 'BO'.
*-TRY -*
call method cl_binary_relation=>create_link
exporting
is_object_a = lo_is_object_a
* IP_LOGSYS_A =
is_object_b = lo_is_object_b
* IP_LOGSYS_B =
ip_reltype = p_reltyp
* IP_PROPNAM =
* I_PROPERTY =
importing
ep_link_id = tmp_oblguid16
* EO_PROPERTY =
endform. " create_url -
Refresh page with data from the Next Record in the Table through a Button
Scenario: Record of a table “prototype” is made up of 8 columns,
key_col,
text_col,
label1_col, label2_col, label3_col,
check1_col, check2_col, check3_col,
I have created the following items on a page:
a) A Display Only item that is populated through a SQL query
“SELECT text_col from prototype where rownum=key_seq.NEXTVAL “.
b) Hidden item for the database columns “label1_col, label2_col, label3_col”
Source type for the hidden items is of type SQL query, Source expression is:
Select label1_col from prototype where rownum=key_seq.NEXTVAL ;
Select label2_col from prototype where rownum=key_seq.NEXTVAL ;
Select label3_col from prototype where rownum=key_seq.NEXTVAL ;
(key_seq is a sequence).
c) Checkbox item for the database columns “ check1_col, check2_col,check3_col"
d) The labels for the above checkbox items are &label1_col. , &label2_col. , &label3_col.
I have created a Save button to save the state of the checkboxes; (STATIC:;1 )
I want the page to be refreshed with the data from the next record (Fields text_col, label1_col, label2_col, label3_col) through a “ Next” Button.
Can I please know how I can achieve this?
Thanks in advanceIf you need the value that is entered in the textbox as the email body, then try this..
<html>
<HEAD>
<title>WebForm1</title>
<script language="javascript">
function mailHTML() {
var content=document.getElementById('textBox').value;
location.href="mailto:?body="+encodeURI(content);
</script>
</head>
<body>
<form name="theform" id="theform">
<div name="body1"/>
<input type="text" value="Test" id="textBox"/>
<input type="button" value="Send Email" onClick="mailHTML()"/>
</div>
</form>
</body>
</html> -
Jump to next record when current record blocked
Dear all,
I have a problem with my oracle forms on the trigger WHEN-VALIDATE-ITEM.
i used that trigger to validate records...if i have a record status "sealed" i want that record wont show up.
here is my script:
if :documents.court_case_number is not null then
case_id:=court_admin.case_read_pck.CcntoCasId(:documents.court_case_number);
select sealed into cs_seal from cases where id=case_id;
if cs_seal='D' then
message('court case: '||case_id||' status seal: '||cs_seal); <-- if status "D" mean : sealed >> i want to just skip that record and jump to next record, i need help the script for this stage
else
return;
end if;
end if;
thank youHadi Wijaya wrote:
Dear all,
I have a problem with my oracle forms on the trigger WHEN-VALIDATE-ITEM.
i used that trigger to validate records...if i have a record status "sealed" i want that record wont show up.
here is my script:
if :documents.court_case_number is not null then
case_id:=court_admin.case_read_pck.CcntoCasId(:documents.court_case_number);
select sealed into cs_seal from cases where id=case_id;
if cs_seal='D' then
message('court case: '||case_id||' status seal: '||cs_seal); <-- if status "D" mean : sealed >> i want to just skip that record and jump to next record, i need help the script for this stage
else
return;
end if;
end if;
thank youDefine Skip!! When?? during navigation, Query??
You are using WHEN-VALIDATE-ITEM trigger to validate records????
If you want the records that are "sealed" to be excluded from your query, you can set the block's either DEFAULT_WHERE or ONETIME_WHERE clause programatically using SET_BLOCK_PROPERTY.
Explain your requirements more clearly so we can help you.
Tony -
How do I validate multiple records held in the form?
I have a form containing a list of records from a base table.
The records consist of 2 columns, a from and to value. The
records must specify ranges and those ranges must be in order
and not overlap. I.e. 1...2, 5...9 NOT 1...4, 3...6. How can I
ensure this is the case before the user commits any changes to
the database?
A When-Validate... trigger doesn't allow me to use built-ins
like GO-ITEM etc which would allow me to do this. Also these
triggers will only look at the current record, not the previous
or next record.
Any ideas?
nullSteve West (guest) wrote:
: I have a form containing a list of records from a base table.
: The records consist of 2 columns, a from and to value. The
: records must specify ranges and those ranges must be in order
: and not overlap. I.e. 1...2, 5...9 NOT 1...4, 3...6. How can
I
: ensure this is the case before the user commits any changes to
: the database?
: A When-Validate... trigger doesn't allow me to use built-ins
: like GO-ITEM etc which would allow me to do this. Also these
: triggers will only look at the current record, not the previous
: or next record.
: Any ideas?
Hi,
There is another way to validate each record as and when it is
created. Create a parameter P1 and created a
WHEN-VALIDATE-RECORD trigger at block level.. The code I used to
verify the requirement is follows. Here Col1 is From and Col2 is
To. You can add more functionalities to it.
WHEN-VALIDATE-RECORD
if :col2 is null or (:col2 <= :col1) then
message(' The numbers should be in order');
raise form_trigger_failure;
end if;
if :parameter.p1 is null then
:parameter.p1 := :col2;
else
if :col1 != :parameter.p1 + 1 then
message(' The numbers should be in sequence');
raise form_trigger_failure;
end if;
:parameter.p1 := :col2 ;
end if;
Hope this will help.
null -
What is the best way to create business documents in CRM
Hi All,
What is the best way to create business documents like contract, sales order, debit memo etc in CRM ? Unlike R3 we can't use our good old BDC with recording. Moreover for most of them although there are Business Object but no BAPI to creation so what is the way ? I found in SDN there are two MAGIC Function module CRMXIF_ORDER_SAVE. Do I need to that alawys ?
Is it nees to via IDoc and cannot be done just by calling from ABAP program ? The input parameter of the FM is a complex deep structure.
Please help.Ashim,
Try looking at the program:
CRM_TEST_ORDER_MAINTAIN
I think that should help you figure out the parameters.
Good luck,
Stephen -
How to implement JSF text input down-arrow key = next record navigation?
Hi All,
I've got a small query which you experts might be able to help me through. I would not be surprised if such questions would already have been raised in this forum.
Formerly, I've created an Oracle Form that allow user to quickly insert data in bulk. It only has three 3 fields - first name, second name and address. Because of the flexibility of the Oracle Form, by pressing the down arrow key, user is able to create record when the last record is detected. And vice versa by hitting the up arrow key, it will move to the previous record when the current record is not the first record. So basically, the form is very 'key-driven' and without the use of the mouse, a lot of data can be inserted very quickly and efficiently.
I've successfully converted such form to an ADF BC JSF page using the JHeadstart toolkit. But when I showed it to my users for comment, they were really disappointed with the number of mouse interactions they need to click every time to navigate between records as well as creating new records. My question is can I build some sort of ADF JSF event handler on any of the text items to perform the following tasks:
1.) When 'down arrow key' is pressed AND not the last record THEN
Go to the next record.
2.) When 'down arrow key' is pressed AND is the last record THEN
Go to the next blank record.
3.) When 'up arrow key' is pressed AND not the first record THEN
Go to the previous record.
4.) When 'up arrow key' is pressed AND is the first record THEN
Do nothing.
If all the four above tasks are achievable in ADF JSF, can you please guide and brief me on the steps to implement them. Or these functionalities are already available somewhere in other open source toolkits. Your help is much appreciated. Thank you and have a nice day.
Kind Regards,
JohnHi Steven,
I've tried to incoporated attached link's codes with the JHeadstart generated code inside the jspx but I still cannot get it to work. There is a lot of Javascript error and is impossible to debug.
Regards,
John -
Services for Object - Store Business Documents (issue with XLSX files)
Hi,
We are using the Services for Object > Store Business Document to be able to drag and drop files into (for example) Sales Inquiry, Sales Order, Sales Quotations etc.
Within OAC2 we have set up the global document types and these have been linked to the relevant Object Types and Content Repositories in OAC3. We have also set up the Content Repository as Document Area 'ARCHLINK'.
The ArhciveLink Basic Settings in OAG1 have the 'Always Copy Document Class from Document Type' set under Storage Settings.
The issue we are having is with XLSX document types. When we drag and drop the XLSX documen type using the Store Business Document the file is stored against the Sales Order but when you come to view the attachments MS Excel opens but an error message appears saying 'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?
We have reviewed SAP notes 1925897, 1739026 and 1145885 however non appear to give me a clear answer as to why this is happening?
I have found that if we unselect the option 'Always Copy Document Class from Document Type' in OAG1 then we can open the XLSX files.
As we have a significant amount of documents attached to various objects, what would be the implications of making this change agianst existing records and new records?
Any advice on this issue would be greatly appreciated.
Gary BHi David,
No joy I'm afraid!!
I added entry 'xlslx' with the relevant MIME Type, Application and Description into table TOADD for the ArchiveLink settings and also this entry was already in tables SDOKMIME and SDOKFEXT for KPro.
I then following the process via the Services for Object within VA12 (Change Inquiry) to then Create > Store Business document > Select the relevant Document Type > Drag and Drop the XLSX file into the empty box.
I then saved the record and tried to view the attachement but I am still getting the same message 'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?
Our client is on componet SAP_BASIS release 701 Support Level 0014 and Support Package SAPKB70114 and I can see that note 1237688 is for SAPKB70112?
Regards
Gary -
Update and move to next record
Sorry if this is a simple question.
I have a form that links to an access database. The page
calls the fields and there is no problem.
I want to be able to have users check the database
information, and make any changes and then update and move to the
next record.
In the update button wizard it asks for a page to go to once
updated - I just need it to move forward.
Thanks for any help.Hi,
I am not clear what you said. But I assume you mean to say:
Right after comming in your if statement you want to update the record first and then you need the validation?? If this is right then you have to move the validation just after the update statement and then print a message just before "END IF".
HTH
Ghulam Mustafa Butt
Maybe you are looking for
-
Hi, Below is a servlet and just a plain java class. Both attempt to connect to a database. Code snippet 2 works and code snippet 1 does not. Snippet 1 is a servlet. Both classes compile ok but at runtime, the one that does not connect to the database
-
After installing Firefox 3.6.16, I received an Adobe Reader update alert that there was an update available. I downloaded the update and then began the installation. During the installation, I received the following alert: "Error 1336. There was an e
-
How to get the range of a textbox in the footer of the 1st page ?
Just like the problem says, how do I use VBA to get the range of the textbox in the footer of the 1st page?
-
My N8 received a new update today (13.0xx, and about 6.5mb). The install was a breeze, but what exactly did this update do for the phones functionality? The pre-download description simply stated "updates the phone and allows using all the new feat
-
Questions about Unplanned deliv cost as Freight in Invoice
Hi Experts, I believe if you don't have any condition for freight in purchase order, then only way to charge freight in Invoice is by using "Unplanned deliv cost" field. My questions are: 1. Is there any way that we can calculate tax on this unplanne