‎2006 Nov 17 1:34 AM
Hi!
i would like to retrieve a data using sap script. In the table LFBK, after i entered a vendor (LIFNR), i get 2 rows of data. My analyst currency in the BVTYP column, so the 1st row of the data is in <b>USD</b>, 2nd row of data is <b>GBP</b>.
in my sapscript, I would like to write:
if ®UD-WAERS& is GBP, then get 2nd rows of data that BVTYP is also GBP.
if BVTYP is empty, then always get the 1st row of data.
should i write as below:
/: IF ®UH-BVTYP& eq ' '
* Beneficiary Bank,, : ®UD-ZBNKA&
* Branch,,,,,, ®UD-ZBSTR&
/: ELSEIF ®UD-WAERS& EQ ®UH-BVTYP&
* Beneficiary Bank,, : ®UD-ZBNKA&
* Branch,,,,,, ®UD-ZBSTR&
/: ENDIF
‎2006 Nov 17 4:16 AM
Hello,
Handling the data from the script it is not posible,u have to do in print program or using subroutines.If u are using standard print program use subroutines concept and extract data according to ur condtion and display them in ur script.
Let me know in more clear,so that I can help u.
Regards
‎2006 Nov 17 4:07 AM
hi there!
i wonder why if my BVTYP is GBP, it didn't go into the if and the elseif (because 1st row is USD, 2nd row is GBP). and no result is displayed.
Do i need to add any coding for it to loop through the LFBK table to match the WAERS (GBP) to BVTYP (GBP)?
please help.
thanks a lot!
‎2006 Nov 17 4:16 AM
Hello,
Handling the data from the script it is not posible,u have to do in print program or using subroutines.If u are using standard print program use subroutines concept and extract data according to ur condtion and display them in ur script.
Let me know in more clear,so that I can help u.
Regards
‎2006 Nov 21 12:55 AM
Hi!
I created a subroutine on standard program and have solved it. thanks a lot!
‎2006 Nov 17 4:17 AM
if your program is using LFBK then so must the sapscript..... but it is referring to REGUD and REGUH. THey need to be consistent.