Tab navigation with multiple records
Hi,
Using oracle forms 10g
I have a form with three tabs - different data blocks, each one can have multiple records. When I select record #3 on the first tab, the corresponding record is not being returned when I click on the 2nd tab. There are relationships defined for each of the data blocks. It does work right when I 'manually' CTR-Page Down through the form from block to block, the correct record is returned and displayed. I have coded the 'when-tab-page-changed' trigger so the topmost tab is being displayed correctly. Not sure what I'm missing... need to do some more coding???
thanks in advance-
Are you sending the cursor to the selected block in the When-Tab-Page-Changed trigger? Also, what are the properties of your data block relationship (Specifically the Coordination properies)? If you have Deferred = YES and Automatic Query = YES then the child data block will not be queries until you navigate to the block.
Craig...
Similar Messages
-
Tab navigation between multiple record items
Hey guys...
How can I navigate between item 1, record 1, to item 2, record 1... then back to item 1, record 2... then to item 2, record 2 etc.?
Then after the last record in item 2, to item 3?
Does this make sense? It's easy to navigate between items and blocks w/o multiple records using the KEY-ITEM-NEXT and GO_ITEM, BLOCK etc. but I'm having problems tabbing back and forth between the appropriate records in the item/block.
Edited by: Mark Folden on Nov 6, 2008 9:22 AMCraig, I'm trying to understand how this solves my problem? Help me out here...
I understand the defaults and have my items arranged as close to the flow as I can get in the object navigator. Unfortunately this doesn't help navigate back and forth between Items (in the same Block) based on the "record".
Maybe this will help explain it better: I have two Items in the same data block (first item is "select_questions", second item is "enter_answer") Each Item displays 3 records. Basically the user has to select and then answer three questions. When they select the first record ("question") from Item one, I want the "tab" to take them to the first record ("answer") in next Item. After the User enters his/her answer and again hits the "Tab", I want to go back to the first Item, second record so they can select their next question. Then to 2nd Item, 2nd record etc.
I'm OK maneuvering between items and blocks w/o this "multiple record" factor. I hope this makes sense?
Thanks.... Mark -
Flat File with multiple record types (OWB 10.2.0.2)
Hi!
I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
Type Value Record Name
======== ===========
T TRAILER
0 DETAILS
1 DETAILS
2 DETAILS
When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
INTO TABLE TRAILER
TRUNCATE
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = 'T'
INTO TABLE DETAILS
APPEND
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = '0,1,2'
The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
Could this be a bug or am I doing something wrong?
Thanks a lot for your help,
YorgosWe`re using two target tables, one for the trailer record and the other for the details records.
We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
Your help is greatly appreciated Jean-Pierre.
Regards,
Yorgos -
How can I convert string to the record store with multiple records in it?
Hi Everyone,
How can I convert the string to the record store, with multiple records? I mean I have a string like as below:
"SecA: [Y,Y,Y,N][good,good,bad,bad] SecB: [Y,Y,N][good,good,cant say] SecC: [Y,N][true,false]"
now I want to create a record store with three records in it for each i.e. SecA, SecB, SecC. So that I can retrieve them easily using enumerateRecord.
Please guide me and give me some links or suggestions to achieve the above thing.
Best RegardsHi,
I'd not use multiple records for this case. Managing more records needs more and redundant effort.
Just use single record. Create ByteArrayOutputStream->DataOutputStream and put multiple strings via writeUTF() (plus any other data like number of records at the beginning...), then save the byte array to the record...
It's easier, it's faster (runtime), it's better manageable...
Rada -
File to RFC with multiple records using BPM Scenario Error...!!!
Hello Guru's,
I have done the File to RFC with multiple records using BPM scenario as per the Materiel available in the sdn.sap. This involves BAPI (BAPI_MATERIEL_AVAILABILITY). I have done exactly the same what is their in the materiel. SXI_CACHE is also giving return value " 0 ". File is getting deleted from the source directory, but no file in target directory. SXMB_MONI is also showing no error (black Flag). BPM is also error free. Checked the interfaces also.
Can any one tell me what mistake would i have done.
Thanks in advance.Hi,
There is one similar discussion I found,
FTP TO RFC using BPM
Thanks
Swarup -
How to isolate error with a record/segment in IDOC with multiple records
I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
1. How can I pre-processed the IDOC to remove those control characters?
Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
Thanks in advance.Split the IDoc.
with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
U have to do this in the context of IDoc.
If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment SEG001 field FLD03 has a special character *</b>.
If U wanna pass this string to source/target, U can do in error messages branch in BPM.
U must use BPM for splitting the IDoc, since it is multi-mapping.
reg.,
Yallabandi. -
Handling Change of IT with multiple records in P&F
Good Morning all,
Has anyone done this yet? What is the approach to change an infotype with multiple records using P&F; For example IT0021, Subtype 2 (Child). I'm assuming that we will need to display all the records in a tbale first in the Form. Then, create a button or radio button for each row. On click, we can then make changes to the record. Any ideas? Thanks
RegardsWelcome to the forum. You can loop through the records like following.
go_block('A');
First_Record;
Loop
variable := :A.Item_Name;
Exit when :System.Last_Record = 'TRUE';
Next_Record;
End Loop;But what happens when u run the above code, the variable will have the last record's item value.
So how you are trying to get all the record's Item value into one item?
Are you going to concatenate? What's the logic you are planning?
Regards
Sankar MN -
Select max date from a table with multiple records
I need help writing an SQL to select max date from a table with multiple records.
Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
0000651005 BASE 15-AUG-07 YES
0000651005 BASE 13-NOV-09 NO
0010973671 BASE 20-MAR-08 YES
0010973671 BASE 18-JUN-10 NOHi,
Welcome to the forum!
Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
For example:
CREATE TABLE table_x
( sa_id NUMBER (10)
, char_type VARCHAR2 (10)
, effdt DATE
, char_val VARCHAR2 (10)
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0000651005, 'BASE', TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0000651005, 'BASE', TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0010973671, 'BASE', TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0010973671, 'BASE', TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
` SA_ID LAST_EFFD
651005 13-NOV-09
10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
Here's how to get those results:
SELECT sa_id
, MAX (effdt) AS last_effdt
FROM table_x
GROUP BY sa_id
; -
I have written a routine that loads a Hex file, checks for record marker,length,address etc then loads the data into a table on front panel. However, my routine only loads single record hex files. I need to be able to load multiple record files, I need to identify the ':' colon record marker start for each record in the hex file, I just can't see how to loop my routine so that all records with ':' prefix marker are loaded.
Jeff,
I'm not exactly sure of what you are trying to do. Is it possible you could post your code, or a screen shot of the diagram in question, so that I can get a better understanding, and possibly offer some assistance?
I am familiar with hex files, but not with the : marker separating records. This may be able to be solved with simple text parsing, and as I am not familiar with how you are retrieving and/or displaying the files, I require more information.
Thanks -
Problem with Multiple record creation using BAPI BAPI_PRICES_CONDITION
Hi,
I am working on IS Media Sales And Distribution wherein i am using BAPI BAPI_PRICES_CONDITION for condition record creation in TCODE JC9B. I am able to create one record using this BAPI for one sales promotion but having problem while creation of multiple records for the same sales promotion wherein my internal table have multiple records. It gives me error that data in BAPICONDIT is missing.
I am aatching followig code for reference
BAPI have field of varkey which i am filling as combination of sales org. + distn channel + sales promotion + delivery type
In this varkey delivery type is changing for sales promotion Can be said that one sales promotion can have multiple delivery type .
Am i giving the correct varkey for each itration of internal table ?
I am attaching code for reference.
Here loop it_cond contain one promotion and multiple delivery type.
sales org distn ch promotion delivery
0100 01 zsalesprom 03
0100 01 zsalesprom z3
LOOP AT it_cond INTO wa_cond.
Get next condition number
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'KONH'
QUANTITY = '1'
SUBOBJECT = ' '
TOYEAR = '0000'
IGNORE_BUFFER = ' '
IMPORTING
number = number
QUANTITY =
RETURNCODE =
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 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.
Here i am concacating varkey for each new delivery
CLEAR : l_min,l_length,l_var.
CONCATENATE wa_cond-vkorg wa_cond-vtweg wa_cond-wrbakt INTO l_var.
l_length = STRLEN( l_var ).
IF l_var+14(2) IS INITIAL.
WRITE wa_cond-lifart TO L_VAR+14.
l_length = STRLEN( l_var ).
ENDIF.
W_LINE = W_LINE + 1.
*First table in BAPI
wa_bapicondct-operation = '009'.
wa_bapicondct-cond_usage = 'A'.
wa_bapicondct-table_no = '506'.
wa_bapicondct-applicatio = 'J0'.
wa_bapicondct-cond_type = 'RATE'.
wa_bapicondct-varkey = l_var.
wa_bapicondct-valid_to = wa_cond-datbi.
wa_bapicondct-valid_from = wa_cond-datab.
wa_bapicondct-cond_no = number. "
APPEND wa_bapicondct TO it_bapicondct.
*Second table in BAPI
wa_bapicondhd-operation = '009'.
wa_bapicondhd-cond_no = number.
wa_bapicondhd-cond_usage = 'A'.
wa_bapicondhd-table_no = '506'.
wa_bapicondhd-created_by = sy-uname.
wa_bapicondhd-creat_date = sy-datum.
wa_bapicondhd-applicatio = 'J0'.
wa_bapicondhd-cond_type = 'RATE'.
wa_bapicondhd-varkey = l_var.
wa_bapicondhd-valid_from = wa_cond-datab.
wa_bapicondhd-valid_to = wa_cond-datbi.
APPEND wa_bapicondhd TO it_bapicondhd.
*Third table in BAPI
wa_bapicondit-operation = '009'.
wa_bapicondit-cond_no = number.
wa_bapicondit-cond_count = wa_cond-cond_count.
wa_bapicondit-applicatio = 'J0'.
wa_bapicondit-cond_type = 'RATE'.
wa_bapicondit-calctypcon = 'C'.
wa_bapicondit-scaletype = 'A'.
wa_bapicondit-cond_value = wa_cond-kbetr.
wa_bapicondit-condcurr = wa_cond-konwa.
wa_bapicondit-promotion = wa_cond-wrbakt.
APPEND wa_bapicondit TO it_bapicondit.
*Fourth table in BAPI
wa_bapicondqs-operation = '009'.
wa_bapicondqs-cond_no = number.
wa_bapicondqs-cond_count = wa_cond-cond_count.
wa_bapicondqs-currency = wa_cond-kbetr.
wa_bapicondqs-condcurr = wa_cond-konwa.
wa_bapicondqs-cond_unit = 'EA'.
wa_bapicondqs-LINE_NO = W_LINE."'0001'.
APPEND wa_bapicondqs TO it_bapicondqs.
*Fifth table in BAPI
wa_bapicondvs-operation = '009'.
wa_bapicondvs-cond_no = number.
wa_bapicondvs-cond_count = wa_cond-cond_count.
wa_bapicondvs-currenckey = wa_cond-konwa.
wa_bapicondvs-currenciso = wa_cond-konwa.
wa_bapicondvs-currency = wa_cond-kbetr.
wa_bapicondvs-condcurr = wa_cond-konwa.
wa_bapicondvs-curren_iso = wa_cond-konwa.
wa_bapicondvs-LINE_NO = W_LINE."'0001'.
APPEND wa_bapicondvs TO it_bapicondvs.
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
EXPORTING
PI_INITIALMODE = ' '
PI_BLOCKNUMBER =
TABLES
ti_bapicondct = it_bapicondct
ti_bapicondhd = it_bapicondhd
ti_bapicondit = it_bapicondit
ti_bapicondqs = it_bapicondqs
ti_bapicondvs = it_bapicondvs
to_bapiret2 = it_bapiret2
to_bapiknumhs = it_bapiknumhs
to_mem_initial = it_cnd_mem_initial
EXCEPTIONS
update_error = 1
OTHERS = 2
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 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
CLEAR : wa_bapicondct,wa_bapicondhd,wa_bapicondvs,wa_bapicondqs.
CLEAR : wa_bapicondit.
ENDLOOP.
ENDIF.
ENDIF.
Kindly Suggest.
Thanks
ParagSolved By myself
There is problem while passing data to internal table for item level -
ABAP Mapping with multiple records
Hi All,
I am doing an ABAP mapping and I am new to this.
I have a following record structure:
<record>
<field1>
<field2>
<fieldn>
</record>
I will receive the multiple records with the above structure in single file.
I have following the Blog from SDN but it is saying only for single record.
Can please someone post the code for handing multiple records (ie. loop structure).
or else please mail me at [email protected]
Regards,
ShyleshHi Thanks for the reply.
But actually these threads do not sufficient for my requriement.
I written the following code and it is working fine for one single record. But I want to change this code to work for multiple records which I am not able to do as I am new to Object Oriented.
method IF_MAPPING~EXECUTE.
initialize iXML
type-pools: ixml.
class cl_ixml definition load.
create main factory
data: ixmlfactory type ref to if_ixml.
ixmlfactory = cl_ixml=>create( ).
create stream factory
data: streamfactory type ref to if_ixml_stream_factory.
streamfactory = ixmlfactory->create_stream_factory( ).
create input stream
data: istream type ref to if_ixml_istream.
istream = streamfactory->create_istream_xstring( source ).
parse input document =================================================
initialize input document
data: idocument type ref to if_ixml_document.
idocument = ixmlfactory->create_document( ).
parse input document
data: iparser type ref to if_ixml_parser.
iparser = ixmlfactory->create_parser( stream_factory = streamfactory
istream = istream
document = idocument ).
iparser->parse( ).
get message content of tag <empno>
data: incode type ref to if_ixml_node_collection.
data: incode1 type ref to if_ixml_node_collection.
data: incode2 type ref to if_ixml_node_collection.
data: incode3 type ref to if_ixml_node_collection.
data: incode4 type ref to if_ixml_node_collection.
data: incode5 type ref to if_ixml_node_collection.
data: incode6 type ref to if_ixml_node_collection.
data: incode7 type ref to if_ixml_node_collection.
data: incode8 type ref to if_ixml_node_collection.
data: incode9 type ref to if_ixml_node_collection.
incode = idocument->get_elements_by_tag_name( 'empno' ).
incode1 = idocument->get_elements_by_tag_name( 'empname' ).
incode2 = idocument->get_elements_by_tag_name( 'address1' ).
incode3 = idocument->get_elements_by_tag_name( 'address2' ).
incode4 = idocument->get_elements_by_tag_name( 'address3' ).
incode5 = idocument->get_elements_by_tag_name( 'zipcode' ).
incode6 = idocument->get_elements_by_tag_name( 'mailid' ).
incode7 = idocument->get_elements_by_tag_name( 'phoneno' ).
incode8 = idocument->get_elements_by_tag_name( 'country' ).
incode9 = idocument->get_elements_by_tag_name( 'city' ).
get XI header data (here: "Sender Service")
data: l_sender_service type string.
l_sender_service = param->get( if_mapping_param=>sender_service ).
add trace (appears in message monitoring)
data: l_trace type string.
concatenate 'Sender Service = ' l_sender_service into l_trace.
trace->trace( level = '1'
message = l_trace ).
build up output document =============================================
create output document
data: odocument type ref to if_ixml_document.
odocument = ixmlfactory->create_document( ).
create element 'SenderService' and add it to the document
data: msgtype type ref to if_ixml_element.
msgtype = odocument->create_simple_element( name = 'record'
parent = odocument ).
create element 'SenderService' and add it to the output document
data: elementsender type ref to if_ixml_element.
elementsender = odocument->create_simple_element( name = 'SenderService'
value = l_sender_service
parent = msgtype ).
add node to the output document
data: outcode type ref to if_ixml_node.
data: outcode1 type ref to if_ixml_node.
data: outcode2 type ref to if_ixml_node.
data: outcode3 type ref to if_ixml_node.
data: outcode4 type ref to if_ixml_node.
data: outcode5 type ref to if_ixml_node.
data: outcode6 type ref to if_ixml_node.
data: outcode7 type ref to if_ixml_node.
data: outcode8 type ref to if_ixml_node.
data: outcode9 type ref to if_ixml_node.
outcode = incode->get_item( index = 0 ).
outcode1 = incode1->get_item( index = 0 ).
outcode2 = incode2->get_item( index = 0 ).
outcode3 = incode3->get_item( index = 0 ).
outcode4 = incode4->get_item( index = 0 ).
outcode5 = incode5->get_item( index = 0 ).
outcode6 = incode6->get_item( index = 0 ).
outcode7 = incode7->get_item( index = 0 ).
outcode8 = incode8->get_item( index = 0 ).
outcode9 = incode9->get_item( index = 0 ).
data irc type i.
irc = msgtype->append_child( outcode ).
irc = msgtype->append_child( outcode1 ).
irc = msgtype->append_child( outcode2 ).
irc = msgtype->append_child( outcode3 ).
irc = msgtype->append_child( outcode4 ).
irc = msgtype->append_child( outcode5 ).
irc = msgtype->append_child( outcode6 ).
irc = msgtype->append_child( outcode7 ).
irc = msgtype->append_child( outcode8 ).
irc = msgtype->append_child( outcode9 ).
render document ======================================================
create output stream
data: ostream type ref to if_ixml_ostream.
ostream = streamfactory->create_ostream_xstring( result ).
create renderer
data: renderer type ref to if_ixml_renderer.
renderer = ixmlfactory->create_renderer( ostream = ostream
document = odocument ).
irc = renderer->render( ).
endmethod.
Can anybody help me making these changes.
Thanks in advance.
Shylesh -
RFIDYYWT across company codes produces 1099 with multiple records per TIN
We have multiple company codes that post 1099-MISC relevant payments to a common set of vendors. All payments are processed through our main (paying) company code.
All our company codes are one taxable entity to the federal government, with one TIN. We are required to submit one file to the IRS.
Unfortunately, when we execute RFIDYYWT across company codes we get multiple records per vendor, one for each company code, despite that the vendor has only one TIN.
How may we customize the system so that a single execution of RFIDYYWT provides an IRS compliant file that aggregates common vendor records?
Thank you in advance for your assistance.
Regards,
Otto Baskin
P.S. Iu2019m happy to award points.Hi
We have similar issue.. It's been long time.. but I thought of asking you.. Did you find solution? If so, can you please share.
Thanks
Srini -
Newbie Help - Tab Canvas with Multiple Pages, Arrow to Navigate between
Hi All,
I am developing my first form. It is a page that requires several pages. I have created a tab canvas and put the pages on (there are 10 pages). When i run the form, i can see the first 4 page headers, and cannot see the other headers. Is there a way to have a arrow at the top so i can click on it to move the display so i can see the other pages?
How would this normally be done? What i am after is a similar multi page navigation to that in the assignment screen, or any oracle screen with several pages.
many thanks
RupzHi, thanks for your reply.
If i press F2, a list of all of the pages appear, but i do not get any arrows.
I have a single tab canvas with 10 pages on it. The pages fit on the canvas, but not on the display window. Do i need to modify the canvas in any way to get the navigation arrows to display?
thanks
Rupz -
Unable to create cross tab report with multiple level dynamic columns
Hi Gurus,
We are trying to develope group above cross tab report with BI Publisher.
i am unable to achieve multiple level columns dynamically.Using cross tab wizard i can achieve single level measure column ,but not the second level column.
Output should look like this:
Country1
Region1 Region2 Region3 --(level1 column)
d1 d2 d3 d1 d2 d3 d1 d2 d3 -- (level2 column)
Row1 10 20 30 70 80 90 40 70 90 --data
Row2 21 24 54 65 23 64 64 76 87
Here regions and d1 d2 d3 may vary based on xml data.Also we have page break on country.
Thanks,
MaheshHi kavipriya,
Any update on this.I have set the rtf and xml to ur gmail id.
Thanks,
mahesh -
Account document parking in BDC with multiple records
Hi,
I am writing one BDC program to park document( not posting the document) using transaction u2018FBV1u2019.In the file, we can have multiple item for posting key 40 and single item for posting key 50 and vice-versa. We can have multiple item both for posting key 40 and 50. But the summation of all amount of all record for posting key 40 and 50 should be u20180u2019( for debit and credit).All these multiple records is actually creating one account document.
I have created the recording and written the BDC program, but I hope I am missing the grouping of records for posting key 40 and 50 for single document number. Can pls guide me for the same. If anyone has encountered such problem, can you pls guide me for the same. If you haave the code for BDC, please send me the same.
Edited by: amrita banerjee on Jun 20, 2008 12:53 AMHi amrita,
I do not understand what do you mean by grouping of records. Can you please explain.
Still for parking documents, the recommended solution will be to use the standard batch input program RFBIBL00.
Here is the sample psedo-code
*bgr00
wa_bgr00-stype = 0.
CONCATENATE 'FBV1' sy-uzeit+0(2) '_' sy-uzeit+4(2)
INTO wa_bgr00-group.
wa_bgr00-mandt = sy-mandt.
wa_bgr00-usnam = sy-uname.
wa_bgr00-start = sy-datum.
wa_bgr00-xkeep = space.
wa_bgr00-nodata = '/'.
MOVE wa_bgr00 TO wa_file.
APPEND wa_file TO it_file.
v_empty_indicator = wa_bgr00-nodata .
*bbkpf
PERFORM build_data CHANGING wa_bbkpf.
wa_bbkpf-stype = 1.
wa_bbkpf-tcode = 'FBV1'.
wa_bbkpf-bldat = wa_docheader-doc_date.
wa_bbkpf-blart = wa_docheader-doc_type.
wa_bbkpf-bukrs = wa_docheader-comp_code.
wa_bbkpf-budat = wa_docheader-pstng_date.
wa_bbkpf-monat = wa_docheader-fis_period.
wa_bbkpf-waers = 'USD'.
wa_bbkpf-xblnr = wa_docheader-ref_doc_no.
wa_bbkpf-bktxt = wa_docheader-header_txt.
MOVE wa_bbkpf TO wa_file.
APPEND wa_file TO it_file.
*bbseg
LOOP AT it_accntgl INTO wa_accntgl.
CLEAR wa_bbseg.
PERFORM build_data CHANGING wa_bbseg.
READ TABLE it_curramount INTO wa_curramount INDEX wa_accntgl-itemno_acc.
wa_bbseg-stype = '2'.
wa_bbseg-tbnam = 'BBSEG'.
wa_bbseg-zuonr = wa_accntgl-alloc_nmbr.
wa_bbseg-newbk = wa_accntgl-comp_code.
wa_bbseg-wrbtr = wa_curramount-amt_doccur.
wa_bbseg-kostl = wa_accntgl-costcenter.
wa_bbseg-aufnr = wa_accntgl-orderid.
wa_bbseg-hkont = wa_accntgl-gl_account.
wa_bbseg-prctr = wa_accntgl-profit_ctr..
wa_bbseg-projk = wa_accntgl-wbs_element.
IF wa_curramount-amt_doccur LT 0.
wa_bbseg-newbs = '40'.
ELSE.
wa_bbseg-newbs = '50'.
ENDIF.
MOVE wa_bbseg TO wa_file.
APPEND wa_file TO it_file.
ENDLOOP.
DATA: l_filepath TYPE eseftappl.
CONCATENATE '/tmp/FBV1_load' sy-uzeit '.txt' INTO l_filepath.
*write app file for rfbibl00
PERFORM write_data_appl USING it_file l_filepath.
*Submit the data to post the document
SUBMIT rfbibl00 WITH ds_name = l_filepath
WITH fl_check = ' '
WITH callmode = 'C'
WITH xinf = 'X'
AND RETURN.
form build_data changing pv_header TYPE any.
DATA:
v_field(3) TYPE n.
FIELD-SYMBOLS <fs_field_value> TYPE ANY.
v_field = 1.
DO.
ASSIGN COMPONENT v_field OF STRUCTURE pv_header TO <fs_field_value>.
IF sy-subrc = 0.
* if the field is empty then fill it with nodata indicatort
IF <fs_field_value> IS INITIAL.
<fs_field_value> = v_empty_indicator.
ENDIF.
v_field = v_field + 1.
ELSE.
EXIT.
ENDIF.
ENDDO.
endform. " build_data
form write_data_appl USING pv_file TYPE ty_t_filedata
pv_file_path TYPE eseftappl.
DATA:
wa_file TYPE ty_filedata,
wa_return TYPE bapiret2,
v_msg TYPE string.
*Open the application server file
*and write the data
OPEN DATASET pv_file_path FOR OUTPUT
IN TEXT MODE ENCODING NON-UNICODE
MESSAGE v_msg.
IF sy-subrc = 0.
* write the file to the application server
LOOP AT pv_file INTO wa_file.
TRANSFER wa_file TO pv_file_path.
ENDLOOP.
CLOSE DATASET pv_file_path.
ELSE.
message e000(00) with v_msg.
ENDIF.
endform. " write_data_appl
Thanks
Romit
Maybe you are looking for
-
Apple Support Communities HI I am receiving THOUSANDS, YES THOUSANDS of eMails from ALL Apple Support Communities.I deleted some one thousand but still more than Normal. Please i need your Help.This is Enormous!!! I've never seen this happening! It s
-
Hi everyone. Having some problem installing Adobe Reader XI on some of our client machines. Installed successfully on thousands of clients, but we have several where it will not complete and they are all the same hardware/image and carry the same sof
-
Problem using * in a query
I'm trying to execute this query: SELECT TO_CHAR(entered_date, 'DD Mon YYYY HH24:MI:SS') as ftime, * FROM messages I can run the TO_CHAR function alone, but when I combine it with * as above, I get an error: FROM keyword not found where expected Is t
-
Shopping cart - item in transfer process
Hello All, We are using SRM 5.0 and the problem is that after the Shopping cart is completely approved,the line item has the status "Item in transfer Process". So, SRM PO is not created for these carts. I have checked almost all the old threads relat
-
Panel field display when process is running
I am developing a program that needs to update the panel to give status information about a process that is running. SO far the panel only appears to repaint when the process completes - is there a way to force a repaint without a break in a process?