01-22-2014 11:12 AM
Hi, In ALV report I have to show the out put like for categore 'c' I have show 'j' document no and for 'T' I have to shoe' H' document no. in a single column how will I show that please share ur knowledge.. Find the bellow attachment... Thanks Abhay Manna.
01-22-2014 11:20 AM
Hi Abhay,
You can achieve thro conditions.
If category = 'C'.
docno = 'J document'.
elseif category = 'T'.
docno = 'H docment'.
endif.
Arivazhagan S
01-22-2014 11:20 AM
Hi Abhay,
You can achieve thro conditions.
If category = 'C'.
docno = 'J document'.
elseif category = 'T'.
docno = 'H docment'.
endif.
Arivazhagan S
01-23-2014 5:15 AM
01-22-2014 11:41 AM
Hi Abhay ,
Use condition like --
loop at it_vbfa.
if vbtyp_n = 'C' and vbtyp_v = 'J' .
add line to output table.
elseif vbtyp_n = 'T' and vbtyp_v = 'H'.
add line to output table.
endloop .
01-22-2014 11:50 AM
Hi Abhay,
It will be better if you give your scenario with examples.
With Regards,
Giriesh M
01-26-2014 4:56 AM
Hello Experts,
My requirement is modification in existing report, from VBFA table I have to show VBELV in report as extra column, in report I am already getting value of VBELN, but requirement is like based on 'vbtyp_n' and 'vbtyp_v' both I have to show the VBELV in a single column and vbtyp_n and vbtyp_v is not any where in the report,and also if 'vbtyp_v' = c then it should fetch
'vbtyp_n' = j category type VBELV and also when 'vbtyp_v' = H then it should fetch 'vbtyp_n' = T category type VBELV. both the type of VBELV I have to show in single column.
Please share your knowledge.
find the attachment which I already attach before.
Thanks
Abhay Manna.
01-26-2014 9:02 AM
Hi Abhay,
In the output data table say it_data, I assume you will be having the field vbelv, vbtyp_n, vbtyp_v.
Option 1.
First you will get the records in it_data from vbfa table.
loop at it_data into wa_data.
if wa_data-vbtyp_n = 'J' and wa_data-vbtyp_v = 'C'.
* Do nothing
elseif wa_data-vbtyp_n = 'T' and wa_data-vbtyp_v = 'H'.
* Do nothing
else.
delete it_data index sy-tabix.
endif.
clear wa_data.
endloop.
Now you will have only the required data in your output table.
Option 2
Or you can do the filtering when you are selecting the records from the database table itself.
Use the following select statement.
Select * from vbfa into table i_vbfa where vbtyp_n = 'J' and vbtyp_v = 'C' or vbtyp_n = 'T' and vbtyp_v = 'H'.
You may also want to delete adjacent duplicates after getting the data if you want to get rid of repeating vbelv.
sort i_vbfa by vbelv.
delete ADJACENT DUPLICATES FROM i_vbfa COMPARING vbelv.
01-28-2014 11:56 AM
01-26-2014 7:46 AM
Hi Abhay,
If you observe your screen shot! You are looking to identify the subsequent document number for the sales order. Position ( item number ) is important to identify the correct delivery also.
for example: for one sales order you have raised the quantity 100. but this quantity can be delivery in the multiple deliveries.
it is very important how the current program is getting the order number or delivery number? please share some more information or selects?