2008 Jun 19 12:22 PM
I have used the follwoing select statement.
select posnr kwmeng meins vbeln from VBAP
into corresponding fields of table it_vbap
where vbeln = v_vbeln.
Now, i am able to get the required fields from VBAP table without any issue.
But, it has been observed that for particluar sales document, the value for the field VBAP-MEINS is 'H' (Hours). I am able to get this value as 'H' only.
But few Sales Documents have the VBAP-MEINS value as 'D' (Day).
Then select statement should retrieve this value as 'D' only.
But instead of this, the select statement is getting this value as '1'.
When i look into SE11-->VBAP table, the table shows it as VBAP-MEINS as 'D'.
When i debug the code, the value shows as '1'.
How to resolve this issue?
Regards
Pavan
2008 Jun 19 12:30 PM
Hi ,
The reaseon for it is that MEINS has a conversion routine CUNIT attached to it.
So the value which you get in the internal table will be the internal representation , but you will not have any problem when you print it or display it in ALV.
Regards
Arun
HI,
Why dont you use the conversion exit for that field of the internal table.
I guess MEINS has the conversion exit.
If it does not solve ur problem u can use CASE Statement.
2008 Jun 19 12:28 PM
Hi there.
That behaviour is normal, because the field MEINS has a convertion routine. The measure Day, has output format as D, but internal as 10.
Use FM CONVERSION_EXIT_CUNIT_OUTPUT after select.
To check how it works, try in SE37, with input parameter 10.
Regards.
Valter Oliveira.
2008 Jun 19 12:29 PM
there is CONVERSION_EXIT for MEINS so ur geting that data in that way
if you want to change 1 to d Use FM 'CONVERSION_EXIT_CUNIT_OUTPUT'.
2008 Jun 19 12:30 PM
Hi ,
The reaseon for it is that MEINS has a conversion routine CUNIT attached to it.
So the value which you get in the internal table will be the internal representation , but you will not have any problem when you print it or display it in ALV.
Regards
Arun
2008 Jun 19 12:31 PM
hi,
use this function module
CONVERSION_EXIT_CUNIT_OUTPUT
reward if hlpful.
2008 Jun 19 12:34 PM
HI,
Why dont you use the conversion exit for that field of the internal table.
I guess MEINS has the conversion exit.
If it does not solve ur problem u can use CASE Statement.
2008 Jun 19 12:58 PM
hi pavan,
as my understanding it should not get like that.
let it be i have one solution try like this.
select posnr kwmeng meins vbeln from VBAP
into corresponding fields of table it_vbap
where vbeln = v_vbeln.
after collecting the data into the internal table write the below code.
loop at it_vbap where meins eq '1'.
it_vbap-meins = 'D'.
modify it_vbap.
endloop.
i think this may solve your problem.
Regards
Sree..
2008 Jun 23 6:45 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |