2006 Oct 26 11:59 AM
i want to move l_t_vbrk and l_vbak table to l_t_output_header_data.
table 1 ; l_t_vbrk (billing document header data)
table 2 ; l_t_vbak (sales document header data)
there is no fields is maching both table ......
with out maching a fields i want to move to third table....
i want to move l_t_vbrk and l_vbak table to l_t_output_header_data.
table 1 ; l_t_vbrk (billing document header data)
table 2 ; l_t_vbak (sales document header data)
there is no fields is maching both table ......
with out maching a fields i want to move to third table....
2006 Oct 26 12:02 PM
If you have no matching field than you can use the below..
loop at l_t_vbrk.
read table l_vbak index sy-tabix.
move-corresponding l_t_vbrk to l_t_output_header_data.
move-corresponding l_vbak to l_t_output_header_data.
append l_t_output_header_data.
endloop.
Please make sure that l_t_vbrk has more lines as compared to l_vbak.
2006 Oct 26 12:03 PM
is it that you want to append the two tables to a third one ?
then append them one by one.. whats the problem in it ?
and please explain this strange scenario in detail.
regards,
Sandeep Josyula
*Mark helpful answers
2006 Oct 26 12:04 PM
Hi Santhosh,
can i know your requirement.why u want to combine both the tables that does not have even a field in common?
it is not logically correct,even though u cna achieve it technically.
Regards,
Sharadha
2006 Oct 26 12:05 PM
Declare the third internal table with include structures of other two internal table. then move the data. I hope u understood this.
regards,
Chandra.
2006 Oct 27 11:03 AM
Hi,
Ur problem is not clear. Why do u want to combine itabs of sales document header & billing document header. Obviously there'll be more entries in VBRK than VBAK.
Logically u need to have a field as a reference to VBAK in VBRK.
I m not clear about what u want to achieve without this.
2006 Oct 27 11:31 AM
Hi santosh ..
Welcome to SDN.
U need to know the sales flow before u start any coding ..
just try to understand this flow..
from Delivery -
> sales here u go
VBRK-VBELN = VBRP-VBELN. "BILLING
VBRP-VGBEL = LIPS-VBELN. "DELIVERY
VBRP-VGPOS = LIPS-POSNR.
LIPS-VGBEL = VBAP-VBELN. "SALES ITEM
LIPS-VGPOS = VBAP-POSNR.
VBAP-VBELN = VBAK-VBELN .. "SALES HEADER
See this is the flow u need to understand.
take a Billing Number and start navigating the flow ..
or get the functional flow first of all ..
once u have the data joining them is not a prob ..
but for u u need to understand the schema flow ..
regards,
VIjay.
2006 Oct 27 12:35 PM
Santosh,
the tables do not match directly because they are linked not by header but item data.
First find the invoive items from VBRP. For each VBRP item there is exactly naximum one VBAK order.
I don't remember the fieldname now but you can find out easily taking an order and an invoice from the document flow and compare the contents.
Regards,
Clemens
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |