cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript, execute BITMAP command conditionally inside IF command

Former Member
0 Kudos

Hello all,

I have 3 command lines:

/:   IF = &W_PRINTER_DEVICE_TYPE& = 'MICR'

/:   BITMAP Z_KIM OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100 XPOS 50 CH

/:   ENDIF

I want the bitmap printed conditionally, based on the value of &W_PRINTER_DEVICE_TYPE&.

I the debugger, I can see the BITMAP command getting executed, even when the value does not equal 'MICR".  It seems like the BITMAP command will always be executed.

Is there some way to conditionally print the BITMAP?

Thanks

Bruce

Accepted Solutions (1)

Accepted Solutions (1)

former_member230486
Contributor
0 Kudos

Hi,

Remove the = symbol in between IF and &W_PRINTER_DEVICE_TYPE&.

/:   IF &W_PRINTER_DEVICE_TYPE& = 'MICR'

/:   BITMAP Z_KIM OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100 XPOS 50 CH

/:   ENDIF

Answers (3)

Answers (3)

Former Member
0 Kudos

sap abap,

Thanks for the answer.  I missed the 1st = in the If statement.  I mistake was painfully obvious when it was pointed out to me.

Bruce

former_member189849
Contributor
0 Kudos

HI

I hope ur if condition is wrong plz se ethe below links

http://scn.sap.com/thread/2065800

http://scn.sap.com/thread/1364271

or

You can have the if statements in the SAPscript itself.

*In your sapscript,

IF COMPANY_CODE = '0010'  

BITMAP THISCOMPANY OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100

ELSEIF

BITMAP THATCOMPANY OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100

ENDIF

Regards

Mahesh

Former Member
0 Kudos

Hi ,

You can try with below code .

/:   IF &W_PRINTER_DEVICE_TYPE& = 'MICR'

/:   BITMAP Z_KIM OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100 XPOS 50 CH

/:   ENDIF

Regards,


Former Member
0 Kudos