cancel
Showing results for 
Search instead for 
Did you mean: 

MM Po Problem.

former_member212002
Active Contributor
0 Kudos

Hi Gurus,

I am working on smartforms now and I am stuck with reuirement now.

The requirement is something like this.

I have got a PO, where If the conditions of that PO is maintained Item wise then we will get the conditins from the item else we will get the conditions from the header.

For this I have made test programs,where it is working fine independently, but when both are combined the output is erroneous.

I have used the following select queries.

FOR ITEM.



select  knumv from eslh INTO TABLE
tt_knumv  FOR ALL ENTRIES IN tt_esll
where   packno = tt_esll-sub_packno.

*-----------------------------------------------change
*SELECT SINGLE ebelp from ekpo INTO l_ebelp
*               WHERE ebeln = p_ebeln.
*
*select   kschl kbetr kwert
*       from konv
*       into table tt_konv
*       where knumv = l_knumv
*             and kposn = l_ebelp.

SELECT  ebelp from ekpo INTO table tt_ebelp
WHERE ebeln = p_ebeln.

select   knumv kschl kbetr kwert
from konv
into table tt_konv
FOR ALL ENTRIES in tt_knumv
where knumv = tt_knumv-knumv.
*        AND  kposn = tt_ebelp-ebelp.

.

For Header


Working for 177
select  ebeln knumv from ekko INTO
TABLE  tt_knumv
where ebeln = p_ebeln.

*-----------------------------------------------change
*SELECT SINGLE ebelp from ekpo INTO l_ebelp
*               WHERE ebeln = p_ebeln.
*
*select   kschl kbetr kwert
*       from konv
*       into table tt_konv
*       where knumv = l_knumv
*             and kposn = l_ebelp.

SELECT  ebelp from ekpo INTO table tt_ebelp
WHERE ebeln = p_ebeln.

select   knumv kschl kbetr kwert
from konv
into table tt_konv
FOR ALL ENTRIES in tt_knumv
where knumv = tt_knumv-knumv.
*        AND  kposn = tt_ebelp-ebelp.

.

Now how to solve this problem.

Any kind of help or logic will be highly appreciated.

Regards,

Abhinab Mishra

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member212002
Active Contributor
0 Kudos

Well in this case,

the problem was with my logic with a simple solution.

We will have check whether the RFQ is maintained or not .

If maintained then fetch data item wise else header wise

Thanks and Regards,

Abhinab Mishra