Skip to Content
avatar image
Former Member

Dynamically Determine the color of graphic

Hi Experts,

Can u plz explain the code how to determine the color of the graphic dynamically.I want black and white graphic on first page and color one on the next page and this must continue

till the last page.....

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 22, 2008 at 12:44 PM

    upload two graphics to sap.

    one is black and white and other is color.

    declare a variable for count type i in global declaration.

    before graphic declaration just

    declare program lines i.e. move sfsy-page to count.

    count the no of pages using sfsy-page.

    insert 2 graphic

    make 2 graphic as conditional.

    i.e. in the condition tab of graphic1 -


    > count = 1.

    then the black and white image will print.

    for the graphic 2 declare ---> count > 1 .

    then the color image will print.

    or u can directly maintain condition for both graphics.

    in the condition tab sfsy-page = 1. block and while

    for second image sfsy-page > 1. color image

    it will work .

    with Regards,

    Kiran.G

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Declare 2 variables in Global Definition value type i.

      count type i.

      Create Program lines before graphic insertion.

      input parameters output

      value value

      count

      in code.

      clear value.

      move sfsy-page to count.

      value = count MOD 2 .

      now insert u r two graphics and make them as conditional.

      for u r black and white graphics

      i.e. goto -


      > condition tab -


      > value = 0 .

      for u r color graphic

      i.e. goto -


      > condition tab -


      > value = 1 .

      it will work,

      with Regards,

      Kiran.G

  • avatar image
    Former Member
    Apr 22, 2008 at 12:40 PM

    in the condition tab of the graphic you can use sfsy-page

    if it is even or odd change the graphic properties

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 22, 2008 at 12:45 PM

    Hi,

    There is tab to the right called CONDITIONS and it allows you to enter a variable value .ie IMG = 1 etc etc

    REWARD IF USEFUL

    Add comment
    10|10000 characters needed characters exceeded